Skip to main content

Linux Command to find a keyword in files under directory and subdirectories

Output stores in a new file:

$ grep -i -r "keyword" *.* > filename.txt

Output stores in a existing file(appended):

$ grep -i -r "keyword" *.* >> filename.txt

Comments