Five Terminal Tips I Use Every Day
Small habits that compound over time:
- Jump back to the previous directory
cd /var/log
cd ~/projects
cd - # back to /var/log
- Reuse arguments from the previous command
mkdir -p ~/.local/bin
cd !!:1
-
Search shell history incrementally with
Ctrl+R. -
Fix a long command with
fc— it opens the last command in your editor. -
Watch a file instead of re-running a command
watch -n 2 'df -h /'
None of these are fancy, but together they save real time every day.