# get the 20 most used commands
# https://github.com/trimstray/the-book-of-secret-knowledge#tool-terminal
history | \
awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | \
grep -v "./" | \
column -c3 -s " " -t | \
sort -nr | nl | head -n 20
# kill process running on port <port>
kill -9 $(lsof -i :<port> | awk '{l=$2} END {print l}')
# find last reboot time
who -b
# show 20 biggest directories with K M G
du | \
sort -r -n | \
awk '{split("K M G",v); s=1; while($1>1024){$1/=1024; s++} print int($1)" "v[s]"\t"$2}' | \
head -n 20