Well since you don't show what command you actually typed, it's hard to tell you what you did wrong. But this might give you what you're looking for:
find /etc -type f | xargs grep -H '10\.' where /etc is the root of whatever tree you want, obviously, and "-type f" tells find to only list files, not directories. xargs runs the command you give it, using xargs's standard input to get the list of arguments to that command. grep's -H is so you know which file the match is from (in case there's only one argument handed to grep). BTW, when grep (or cat or just about any unix command) appears to hang, try typing a Control-D character---it's probably waiting on its standard input, which Control-D will terminate. HTH, --Pete On Tue, Mar 05, 2002 at 12:52:44PM -0800, justin cunningham wrote: > Hi, I read through man on find and grep and am trying to search for an > ip in some files contained in folders but every time I type in grep > options it just hangs. What am I doing wrong? > > Conversely i can go into /site.com/cgi-bin then cat any.cgi | grep > 10.0.0.1 > > and will get the desired result but instead of doing this for 'every > file' in 'every folder' I want to search for the 10.ip in the files from > the site's root directory. > > Hope this is clear. Thanks, justin > > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]