- Arrow keys do what you'd expect
ctrl+awill put you at the beginning of the linectrl+ewill put you at the endctrl+wdeletes previous word (space delimited)tabwill auto-complete commands (requiresbash-completion)ctrl+lforces a screen redrawctrl+rrecursively searches through historyctrl+cstops
!!- substitute in last command here!$- place last argument of last command here./- current directorycd- change to home directorycd -- Change to last directory^foo^bar- Run last command replacing stringfoowithbarfc- Open last command in$EDITOR. Execute upon save+quitctrl+x;e- Open current command line in$EDITOR
Replacement for cat that shows file progress via stderr
Parallel gz. Compression sizes are similar if not same, but uses multiple cores
pigz -c ./ChessData.tar > ChessData.tar.pigz.gzYou can send the same input to multiple outputs without having to run multiple commands
pv ./ChessData.tar | tee >(gzip - > /tmp/ChessData.tar.gz) >(bzip2 - > /tmp/ChessData.tar.bz2) | xz - > /tmp/ChessData.tar.xzUse flock to make a lock with a file. This helps with cron jobs
* * * * * /usr/bin/flock -w 0 /path/to/cron.lock /usr/bin/php /path/to/cron.phpPut a file into the clipboard
cat file.txt | xclip -selection clipboard -inPut clipboard into file
xclip -selection clipboard -out > file.txtCommand Line Tools Can Be 235x Faster Than Your Hadoop Cluster