I want to search recursively for files containing a string. I want to search:
- Files in and under the directory I'm standing in currently
- A specific directory.
I want to see only results. I don't want to see "permission denied" messages or other things. Only the file locations that contain the string I search for.
How do I do it?
Best Answer
grep -lr searchstring * /path/to/dir 2>/dev/null