Search for a string within files in the current directory
grep -wrin "search for this text" .
Find subdirectories matching a pattern
find /your/directory -name "pattern*"
Find text in a file with lines above
bin/tdb | grep -iA 1 "SOMETHING"
Copy with exclusions
rsync -avrn --progress experiment.005 test/ --exclude "ap2-files" --exclude "xf-files"