Differences between revisions 1 and 2
Revision 1 as of 2005-06-30 08:00:39
Size: 405
Editor: ID00243
Comment:
Revision 2 as of 2005-06-30 08:06:54
Size: 466
Editor: ID00243
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from JunHu/Memo/FindingFilesContainText

Find Files Containing Text

You may always pipe the output of commands through grep to find specific words, but it can also be used to find files that contain a text string:

grep -lir "some text" *

The -l switch outputs only the names of files in which the text occurs (instead of each line containing the text), the -i switch ignores the case, and the -r descends into subdirectories.

JunHu: JunHu/Memo/FindingFilesContainingText (last edited 2008-10-03 20:18:34 by localhost)