RE: Newby Question FC4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
From: fedora-list-bounces@xxxxxxxxxx [mailto:fedora-list-bounces@xxxxxxxxxx] On Behalf Of chalonec
Sent: Wednesday, January 18, 2006 12:08 PM
To: For users of Fedora Core releases
Subject: Newby Question FC4

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. 
-----

What you're wanting can be granted by a *combination* of grep and find. (Ah! The beauty of Unix...)

If I want to search all the files on the system for the string "foo", I could do the following:

find / -type f -exec grep -l foo {} \;

Note that this might take a while, and it would be better to start with a subset already selected. i.e. If you're looking for config files specifically, do find /etc instead of find /.  


-- 
Robert P. Nix		Mayo Foundation
RO-OC-1-13		200 First Street SW
507-284-0844		Rochester, MN 55905
-----
"In theory, theory and practice are the same, but
 in practice, theory and practice are different."


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux