One-liners
$ history | awk '{print $2}' | sort | uniq -c | sort -nr | head
$ command -v cmd >/dev/null && echo yes
$ for f in *.txt; do mv "$f" "${f%.txt}.bak"; done
$ sed -i 's/old/new/g' *.txt
$ find . -type f -size +100M
$ find . -mtime +30 -delete
$ find . -type d -empty -delete
$ tar czf backup.tar.gz directory/
$ split -b 1G largefile part-
$ < /dev/urandom tr -dc A-Za-z0-9 | head -c 32; echo
$ rsync -ah --progress src dest
$ pv largefile | gzip > largefile.gz
$ command | xclip -sel clip
$ upower -i $(upower -e | grep BAT) | grep percentage
$ mount -t tmpfs -o size=1G tmpfs /mnt/ram
$ dd if=/dev/zero of=test bs=1G count=1 oflag=dsync
$ dd if=iso.iso of=/dev/sdX bs=4M status=progress
$ script --log-timing timing.log session.log
$ sshfs user@host:/remote /local
$ ruby -run -e httpd . -p 8000
$ while true; do echo -e "HTTP/1.1 200 OK\n\n$(date)" | nc -l 8080; done
$ convert -delay 10 -loop 0 *.png animation.gif
$ ffmpeg -i input.mp4 output.gif
$ gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf
$ git branch --show-current
$ echo "text" | pv -qL 10
Copied to clipboard