RSSAmplifier

susi.dev · Nov 19, 2021

Useful Commands

0
Sign in to vote or save

Susanne Moog · susi.dev

Published on

Authors

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.

Read the original on susi.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.