Want to search your file system on Linux? It's easy!
grep -r --include=\*.txt 'searchterm' ./
...or case-insensitive version...
grep -r -i --include=\*.txt 'searchterm' ./
- grep : command
- -r : recursively
- -i : ignore-case
- --include : all *.txt: text files (escape with \ just in case you have a directory with asterisks in the filenames)
- 'searchterm' : What to search
- ./ : Start at current directory.
Thank you, that's what I needed.
ReplyDelete