Results 1 to 3 of 3
Hi,
I have a word called 'CRIS' in some file.
I dont know the file name also.
But i want to list all the files which contaions the word 'CRIS'.
...
- 02-15-2010 #1Just Joined!
- Join Date
- Jan 2010
- Posts
- 3
how to find the text inside a file.
Hi,
I have a word called 'CRIS' in some file.
I dont know the file name also.
But i want to list all the files which contaions the word 'CRIS'.
How can i search for the file which contains that word.
Thanks
- 02-15-2010 #2
use grep.
grep -r "CRIS" /path/to/directoryNew to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 02-16-2010 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 42
If you just want to find the filename. You can use the -l switch. You might also add -i for case insensitive.
# grep -lr "CRIS" /path


Reply With Quote