sed -i '' '/null/d' filename.txt — removes all strings containing null from a file filename.txt
wc -l filename.txt — prints the number of lines in the file
ack "text-to-find" .
grep -r "text-to-find" .
ack -c "text-to-find" .
grep -cr "text-to-find" .
NB: ack is generally much faster than grep
Easy with rename: brew install rename
Rename files like output_01_01_2017.txt to output_2017_01_01.txt:
rename 's/output_(\d\d)_(\d\d)_(\d\d\d\d)\.txt/output_$3_$2_$1\.txt/' *
python -m SimpleHTTPServer [port]
Starts a webserver on port port (default is 8000).
Need to create such a cheat sheet as I'm tired to google for same stuff from time to time.