Tuesday, June 9, 2015

Search a file with matching a pattern under directory in linux, unix ..

Run this command
grep -H -r [pattern] [directory]

 pattern - Replace this with your custom patter
 directory - Replace this with your custom patter
-H : means to print the filename for each match.
-r : Read all files under each directory, recursively;


No comments:

Post a Comment