clear && find . -name “*.tex” -exec grep -Hn <search string> {} \;
Posts Tagged ‘find’
March 26, 2014
0
finding text in files using find in linux
By thomas in linux, ubuntuBased on this stack-overflow response: http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-in-linux one way of searching for files containing a certain text patterns is: grep -rnw ‘directory’ -e “pattern” if you want to search relative to your current position replace “directory” with a . so: grep -rnw . -e “pattern”
Tags: find