[CLUG] potential dumbo question, mais moi brain suis dust today

Peter Flynn pflynn at imbolc.ucc.ie
Thu Jul 5 16:28:02 IST 2001


> I wanna do a recursive (in a directory context) grep on files...plain and
> simple.....how?
> (without doing mad crap with an ls -alR then AWK'ing and cutting and piping
> file names back into a command parameter to run with grep, etc etc :( )

$ find /somedir -exe grep 'something' {} \; -ls

The {} stands for "current file being looked at" and the \;
means "end of my embedded grep command". The -ls will then
identify the file that got searched.

///Peter




More information about the Cork mailing list