Newby Question FC4

Paul Howarth paul at city-fan.org
Wed Jan 18 18:14:08 UTC 2006


chalonec wrote:
> I have installed FC4 and am looking for a command line way to search all 
> files in all directories and sub-directories on a disk for files that 
> contain a certain text string such as the word gateway or mode or any 
> word. There are so many config files on Linux that if I had this 
> capability I could find out which one had the information I needed so I 
> could then begin to identify where I might want to look to fix or 
> troubleshoot something other than the log files.  If this were Windows, 
> I would just use the text search string gui by right-clicking start.
> 
> I have tried find, grep, locate, egrep, man, and the Internet and have 
> had varying levels of success but none seem to be consistent.  There are 
> a dizzying number of options,
> 
> I am pretty sure grep or find should work but I can't figure out how.
> 
> Can someone help ?

A case-insensitive search for the word 'gateway' in directory /etc and 
all subdirectories:

$ grep -i -r 'gateway' /etc

Paul.




More information about the fedora-list mailing list