Slow Notes

Things I fixed, broke, or finally wrote down.

Three small shell habits that stuck

Every so often I read a list of forty terminal tricks, adopt three, and keep none. These are the exceptions: small enough to become reflexes.

1. Dry run first, always

If a command deletes, moves or overwrites, I run the listing version first. For rsync that is the -n flag; for a find with -delete it is the same find without it. It costs five seconds and has saved a directory more than once.

rsync -avn --delete photos/ /mnt/backup/photos/

2. Name the terminal tab

I used to have six tabs all called bash. Now the first thing I do in a long session is set the title to the machine and the job. Most of my worst mistakes were the right command in the wrong window.

3. Write the undo before the do

Before changing a config file, I copy it next to itself with the date in the name. Before a migration, I write down the exact command that puts things back. If I cannot write that command, I am not ready to run the first one.

That last one changed how I work more than any tool did.

Older: What I changed after my home server's disk filled up