Need unix command file HELP!

Geoff Loker gkloker at utai.UUCP
Mon Feb 17 05:58:36 AEST 1986


In article <259 at hadron.UUCP> jsdy at hadron.UUCP (Joseph S. D. Yao) writes:
>All the folk who are responding that the way to get the file names
>of files containing a particular string are kind of forgetting that
>the grep family does  n o t  automatically print out file names.
>This:
>
>>find / -exec fgrep this-is-the-string '{}' \;
>
>will give a file full of lines containing this-is-the-string.  Try:
>

I don't know if this is any quicker than your script file suggestion
for finding file names with the string (we don't have ksh), but the
grep family does have an option to print out only the name(s) of
file(s) that contain the match-string.  Try:

find / -exec fgrep -l this-is-the-string '{}' \;
-- 
Geoff Loker
Department of Computer Science
University of Toronto
Toronto, ON
M5S 1A4

USENET:	{ihnp4 decwrl utzoo uw-beaver}!utcsri!utai!gkloker
CSNET:		gkloker at toronto
ARPANET:	gkloker.toronto at csnet-relay



More information about the Comp.unix.wizards mailing list