Terminal commands that have not changed in thirty years

Learn these once and they keep paying off on every machine you will ever touch.

Daniel RenInfrastructure
· · 2 min read

Graphical tools come and go, but a handful of command-line programs have behaved the same way since before most of today's apps were written. They are available on practically every server, and the skills transfer directly.

The short list

  • ls, cd, cp, mv — moving around and moving things.
  • grep — finding a needle in any number of haystacks.
  • find — locating files by name, age or size.
  • tail -f — watching a log file as it grows.
  • ssh and scp — working on and copying to other machines.
  • tar — packing directories for backups and transfers.

Three combinations worth memorising

# the 20 largest files under the current directory
find . -type f -printf "%s %p\n" | sort -n | tail -20

# every line mentioning "error" in today's logs
grep -i error /var/log/syslog

# a compressed, dated archive of a folder
tar czf notes-$(date +%F).tar.gz notes/

None of these will make you a wizard overnight. But they turn “I have no idea what is happening on this machine” into “give me two minutes”, which is most of what you need.

Daniel RenInfrastructure at Bet on Future

Looks after small servers and writes down everything that broke along the way.