Handy Linux & Mac shell commands

Linux & MacOS shell commands that do useful things for DOS type folks.

List all sub-directories of current directory with size, sorted by size

du -h --max-depth=1 | sort -hr

Find / delete all files that match a pattern on the drive. Add/omit the -delete parameter

find . -name "*.bak" -type f -delete