Tuesday, November 19, 2013

File content search command in linux

By default, grep command prints the matching lines You can pass -H option to print the filename for each match.


$ grep -H -r “irfan” /etc/passwd