6 March 2025

Terminal Tips

Learn the basics of your shell. grep, awk, sed, and find can save hours of manual work. Use aliases to speed up your workflow.

Master these shell commands:

find — Locate files

find . -name "*.vue" -type f
find . -mtime -7 -type f  # Modified in last 7 days

grep — Search content

grep -r "TODO" src/
grep -i "error" log.txt  # Case-insensitive

awk — Process text

awk '{print $1}' file.txt  # First column
awk '/pattern/ {print}' file.txt  # Lines matching pattern

sed — Stream editing

sed 's/old/new/g' file.txt  # Replace text
sed -i 's/old/new/g' file.txt  # In-place edit

Aliases — Speed up workflow

alias gs='git status'
alias gc='git commit'
alias gp='git push'

The faster your tools, the more time you have for actual work.