Thanks to all. I received tons of email. Here are what I found useful: find . -type f -exec grep -li foo {} \; find . -type f | xargs grep "foo" find . -type f -exec printf "'%s'\n" {} \; | xargs grep foo /dev/null find . -type f -print |xargs grep -l "foo" find . -depth -type f -exec grep 'foo' {} \; -print find . -type f -exec strings {} \; | grep foo find <path_filesys> -xdev -type f -exec grep -w <word> {} /dev/null \; -xdev will stop you crossing mount points /dev/null will show the file that matches the string and also the string match rgrep from http://www.shelldorado.com/scripts/cmds/rgrep.txt Sincerely, Dan >From: "Dan Lee" <koinonia98@hotmail.com> >To: sunmanagers@sunmanagers.org >Subject: grep for a word in the whole filesystem >Date: Wed, 20 Mar 2002 17:22:25 -0500 > >Folks, > >Is there a way to grep for a pattern in the entire filesystem? I would >like >to be able to grep for example the word "foo" without the knowledge of >where >it is located. It can be in any directories or partitions. Do I use a >combination of find and grep? Hopefully, it will skip any binary >executable >files within the search to avoid the command being hang. > >TIA, >dan > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. >_______________________________________________ >sunmanagers mailing list >sunmanagers@sunmanagers.org >http://www.sunmanagers.org/mailman/listinfo/sunmanagers _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Thu Mar 21 08:40:20 2002
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:37 EST