- Published on
Useful Commands
- Authors
- Name
- Susanne Moog
A grab bag of small commands that are useful in day‑to‑day dev work.
Bash
- Find files by name (case‑insensitive):
find . -iname "*foo*"
- Replace text recursively (ripgrep + sd):
rg -l "from" | xargs sd "from" "to"
- Show disk usage of current directory, human readable:
du -sh ./* | sort -h
SQL
- Count rows in a table:
SELECT COUNT(*) FROM my_table;
- Delete older than 30 days:
DELETE FROM logs WHERE created_at < NOW() - INTERVAL 30 DAY;
Adapt the snippets to your environment and always double‑check destructive commands before running them.