Thursday, 25 October 2012

Command to search a string in a file in linux



Below is simple command which searches string all the  files in specified URL

find pathToDir -type f -exec grep -l yourstring {} \;


Where

pathToDir :path of directory where you want search string in files.
yourstring :String you want to search


Also check below links :


No comments:

Post a Comment