grep

Robert Shaw rjshaw at ramius.llnl.gov
Tue Oct 23 19:35:45 AEST 1990


Question from Len Teifel:
|
| I have a main directory with hundreds of subdirectories, 
| and I want to find a file with a particular string, say "xyz"
| The grep command only works in one directory at a time. Is there
| a way of searching my whole directory structure to find a file
| with a particular string?
| 
try find ~ -name \*xyz\* -print

Or, not quite as nice: ls -R ~ | grep xyz

===============================================================================
                                                       rjshaw at ramius.llnl.gov
            _____   ____   ____   ______  
   R o b   /    /  / / /  /   /  / / / /
 -------- /  --/  /   /  / / /  / / / / ---------------------------
         /--  /  / / /  /   /  /     /   S h a w    
        /____/  /_/_/  /_/_/  /_____/                      

 The Cosby's are precisely what's wrong with television today...
===============================================================================



More information about the Comp.unix.questions mailing list