Searches inside a filesystem a file with term1 AND term2 strings inside it (in this order)
find . |grep -i -e 'term1.*term2'# Exclude from ls command: file1,file2
ls -la | grep -v -e file1 -e file2Massive search and replace a string inside a bunch of files, it might take some time...
grep -rIl 'Some Text Here' /path/where/files/are/* | xargs sed -i 's/Some Text Here/Ben is cool/g'In this example I'm searching This Pattern in filename and it prints up to 20 lines after it
grep -A 20 "This Pattern" /path/to/filename