Home > how do I?, solaris 10, useful > Grep through a unix directory with a long list of files

Grep through a unix directory with a long list of files

Sometimes when attempting to grep through the files in a directory, there are so many files in the directory that grep returns an error indicating the argument list is too long.  Fix this by using xargs.

find ./ -print | xargs grep -l <your_string>

Advertisement
Categories: how do I?, solaris 10, useful
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.
Follow

Get every new post delivered to your Inbox.