Need unix command file HELP!

a.reed hfavr at mtuxo.UUCP
Tue Feb 4 10:45:39 AEST 1986


> We are looking for a utility that can, when given a arbitrary string,
> can locate all occurences of that string anywhere on the system. Our
> local Un*x gurus can't figure this out, so we are appealing to those out
> in Netland to help us out.
> We are looking for the command to work like this:
> 
> findstring this-is-the-string
> 
> The utility would return all the files (and their pathnames from the
> root) to the screen. Of course if the protections on the file indicate
> that the file cannot be read, the program should ignore that file and keep
> on going. We think it can be done using a command file using the 'ls'
> and 'awk' commands but we just can get it right.
> Please send source code (or ideas on writing this code) to us and we
> will post to net a summary of working code.
> Thanks in advance.
> 
> sutton at aerospace.ARPA
> {ihnp4!sdcrdcf,randvax,trwrb} ! aero ! sutton
> sutton%aerospace.ARPA at WISCVM.BITNET

# In ksh or sh this is a one-liner:
2>/dev/null find / -exec fgrep -l $1 {} \;
# Please do not post ELEMENTARY shell questions to net.unix-wizards!
# 			Adam Reed (ihnp4!npois!adam)



More information about the Comp.unix mailing list