Alex Moreno
← All posts

Shell one-liners I use every week

· 1 min read

Find the biggest folders, copy repositories without node_modules, and other small commands that keep earning their keep.

On this page

A short list of commands I keep coming back to.

Biggest folders first#

du -sh -- */ | sort -rh | head -n 10

Copy repositories without their dependencies#

rsync -av --exclude 'node_modules' --exclude '.venv' ~/code/ /mnt/backup/code/

What changed today?#

git log --since=midnight --oneline --all

Rename files in bulk#

for f in *.jpeg; do mv -- "$f" "${f%.jpeg}.jpg"; done