sort

Numericaly sort file. Fields are separated by :. Use key in position 2: sort -n -k2 -t : /etc/password Sort by size of directories/files: du -h | sort -n

ssh-add

Add identities: Default: ssh-add Specific: ssh-add path/to/identity With 1h lifetime: ssh-add -l 3600 path/to/identity List identities: ssh-add -l Locking: Lock w/ password: ssh-add -x Unlock: ssh-add -X Delete identity: ssh-add -d path/to/identity Delete all identities: ssh-add -D

tarsnap

List archives: tarsnap --list-archives | sort List size of all archives: tarsnap --print-stats Create archive: tarsnap -v -c -f ARCHIVE_NAME /path/to/file /path/to/dir Restore archive: tarsnap -v -x -f ARCHIVE_NAME Delete archive: tarsnap -d -f ARCHIVE_NAME Useful doc: https://www.tarsnap.com/simple-usage.html

tmux

Favorite commands Create session: tmux new [-s <session name>] Detach session: Ctrl + b, d Attach session: tmux a -t <session name> Rename session (while in it): Ctrl + b, $ List sessions: tmux ls OR Ctrl + b, s Kill session: tmux kill-session -t <session name> Go to previous session: Ctrl + b, ( Go to next session: Ctrl + b, ) Scrolling Scroll session: Ctrl + B + [ Page Up | Page Down ] Enable scroll mode: Ctrl + b, [ Exit scroll mode: q Panes Move pane left/right: Ctrl + B + [ { | } ] Toggle between pane layouts: Ctrl + b + spacebar Split window into panes vertically: Ctrl + b + " Split window into panes horizontally: Ctrl + b + % Kill pane: Ctrl + b + x Switch to pane to the direction: Ctrl + b + <arrow key> Helpful websites https://danielmiessler.com/study/tmux/ https://tmuxcheatsheet.com/ Sharing a TMUX session across user accounts Create new session: tmux -S /tmp/shareds new -s shared Have them connect: sudo tmux -S /tmp/shareds attach -t shared Source: https://www.howtoforge.com/sharing-terminal-sessions-with-tmux-and-screen ...