Nov 092010
Only show filenames in grep command
Answer:
Sometimes you want the grep command only return the filenames that matched a pattern, you can try the following:
# grep -r -l "foo" .
The key is the -l option.
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Only show filenames in grep command
Answer:
Sometimes you want the grep command only return the filenames that matched a pattern, you can try the following:
# grep -r -l "foo" .
The key is the -l option.