Paper Almanac

A few command-line habits worth keeping

November 2026

None of these takes longer than the command it protects. Together they have prevented most of the evenings I would rather not repeat.

Print first, then act

Many commands that change files can first say what they would do. Where such a flag exists, use it once before using the command for real. Where it does not, the list of targets can usually be printed and read before it is handed to the command.

Read the page for the options you use

A flag remembered from an example is a flag half understood. The manual for a single option is a few lines, and it is the place where the exceptions are written down.

Keep the history honest

A command is worth keeping in the history exactly as it was run, not hidden behind a short alias. Half a year later the history is a record of what worked, and an alias explains nothing.

Quote on principle

Quotes around a variable cost two characters. A file name with a space in it costs an afternoon. The habit is easier to keep than the exception is to remember.

Finish with a check

Whatever a command was supposed to produce, look at it before moving on: list the directory, print the count, open the file. Most mistakes are harmless when they are noticed in the next minute and awkward when they are noticed next week.

All notes