nubbins

compare contents of two directories

for f in $(find dir1/ -type f | awk -F/ '{print $NF}') ; do
	find dir2/ -type f -name "$f" -exec echo {} is in both \;
done

processes

zombies

check the number of zombie processes

ps aux | awk '$8 ~ /Z/ { print }' | wc -l

sort by resource usage

find top processes sorted by mem or cpu usage

ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head

tmux ssh

use tmux window name to ssh (.bashrc function example)

ssh() {
	[ $# -eq 0 ] && \
		/usr/bin/ssh $(tmux display-message -p '#W') || \
		/usr/bin/ssh $*