Set window name in Tmux to hostname
This is the quick way to set window name to hostname connected to.
printf "\033k`hostname -s`\033\\"
Generating passwords with /dev/random
One-liner to generate passwords, lock files, etc.
watch -n5 'cat /dev/urandom | tr -dc \[:alnum:\] | head -c12; echo'
fdupes to remove duplicate files on Linux
Ssh complains host id has been changed
Send file as attachment from commnad line
There’s an easy way of sending files as attachment from command line:
uuencode file name | mail -s "Subject" "email@example.com" -- -firstname.lastname@example.org
Yes, there is double hyphen and -f before the from email address.