git log | git log --oneline -20 | Full bodies are rarely read; 20 commits covers a typical REVIEW window | Sha, subject, order |
git diff | git diff --stat (summary) OR git diff --unified=1 (context) | --stat for "what changed", -U1 for "show me the edit" — pick by intent | File list + line counts, or hunks with 1 line of context |
cat <file> | wc -l <file> (count only) OR head -20 <file> (preview) | Reading a whole file to check one thing is the #1 waste | Length, or top-of-file shape |
ls -la | ls -1 | Permissions/owners/sizes rarely affect logic decisions | Filenames, one per line |
npm test | npm test -- --silent or --reporter=minimal | Dot reporters are ~10x smaller than spec reporters | Pass/fail count, failing test names |
pytest | pytest -q --tb=line | Quiet mode + one-line tracebacks keeps failures visible, drops noise | Pass/fail, single-line failure summaries |
grep -r <pat> | grep -rc <pat> (count) OR grep -rl <pat> (files only) | "Does it exist?" rarely needs full matching lines | File list or per-file count |
find . | find . -maxdepth 2 -type f | Unbounded walks on large repos dump thousands of paths | Top-N levels, type-filtered |
docker ps -a | docker ps --format 'table {{.Names}}\t{{.Status}}' | Default columns include ports, command, image — usually irrelevant | Name + status |
kubectl get pods -o yaml | kubectl get pods | YAML is multi-kilobyte per pod; drop it unless you need a specific field | Name, ready, status, restarts, age |
tree | tree -L 2 OR ls -R | head -40 | Unbounded recursion blows context on monorepos | Top 2 levels, directory shape |
go test ./... | go test -run TestName ./pkg (targeted) OR go test -count=1 -failfast ./... (first-fail) | Full suite is wasteful when you edited one package | Pass/fail for the code you actually touched |
ps aux | ps -o pid,comm,stat --sort=-pcpu | head -10 | Default columns dump env and args for every process | Top CPU consumers, named |