binary

find binary location

which okular

files

diff

diff -qr dir1/ dir2/
git diff --no-index dir1/ dir2/

find large folders

du -h -d1 . | grep '[0-9\,]\+G'
ls -l --block-size=M

find and remove

find ./*/builds/*/results -type f -name '*' -exec rm {} +
find ./*/builds -type d -name '*' -exec rm -rf {} +
find . -type d -name builds -exec rm -rf {} +

find date of most recent file in folder

find /path -printf '%T+ %p\n' | sort -r | head

Processes

ps aux

a – show processes for all users
u – display the process's user/owner
x – also show processes not attached to a terminal

kill <pid> -s <signal>

Send signal to a process.

Why? ⟶ github.com/heroku/issues/817.

devices

safely remove drives

udisksctl unmount -b /dev/sdd2
udisksctl power-off -b /dev/sdd

suspend on timer

sleep 20m  && systemctl suspend -i