grep "text string to search" directory-path
grep [option] "text string to search" directory-path
grep -r "text string to search" directory-path
grep -r -H "text string to search" directory-path
egrep -R "word-1|word-2" directory-path
egrep -w -R "word-1|word-2" directory-path
Recursively Search All Files For A String:
cd /path/to/dirIgnore case distinctions:
grep -r "word" .
grep -r "string" .
grep -ri "word" .To display print only the filenames with GNU grep, enter:
grep -r -l "foo" .You can also specify directory name:
grep -r -l "foo" /path/to/dir/*.c
Нема коментара:
Постави коментар
Напомена: Само члан овог блога може да постави коментар.