Spunk Autos

Websites and web tools

Terminal Tools: A Comparison Table by Task

The terminal is a text window where you type commands instead of clicking. For anyone who maintains a small business website, deploys a static site or reads server logs, a handful of terminal tools cover most jobs. The tables below compare the classic tools that ship with most systems against newer open-source options, by task.

How to read these tables

The classic tools are installed by default on most Linux and macOS systems, which makes scripts that use them portable. The newer tools are separate installs, often with friendlier output and defaults. Neither column is a winner overall; the right pick depends on whether you value portability or convenience for the task.

Shells

ShellDefault onStrengthsWatch out for
bashMost Linux systemsHuge body of examples; scripts run almost everywhereOlder version on some macOS installs
zshRecent macOSStrong completion and customisation; mostly bash-compatible for daily useSome bash script features behave differently
fishSeparate installHelpful suggestions out of the box, readable syntaxNot POSIX compatible; do not write shared scripts in it

Searching and finding

TaskClassic toolNewer optionTrade-off
Search text in filesgrep -rripgrep (rg)rg skips ignored files by default and is often faster on large folders; grep is everywhere
Find files by namefindfdfd has simpler syntax; find has more options and is always present
Fuzzy pick from a listNone built infzfMakes history and file selection interactive; an extra dependency

Viewing and editing

TaskClassic toolNewer optionTrade-off
Read a long filelessbatbat adds colour and line numbers; less handles huge logs well
Edit a config file on a servernano or viYour local editor over a remote connectionnano is easiest to learn; vi is present on almost every server
Inspect JSONpython3 -m json.tooljqjq can filter and reshape; the Python module only pretty-prints

Network and web

TaskClassic toolNotes
Fetch a page or APIcurlcurl -I shows only the response headers, useful for checking redirects
Download a filewgetHandles retries and recursive downloads
Look up DNS recordsdigdig example.com MX shows mail records
Check a TLS certificateopenssl s_clientAdd -servername for shared hosts

Sessions and multitasking

On a remote server, a terminal multiplexer such as tmux or the older screen keeps your session running if the connection drops. That matters for long jobs like a large file upload or a database export. tmux is more common in current tutorials; screen is more likely to be already installed on older systems.

What to weigh before switching

  1. Will scripts using this tool run on servers where you cannot install software?
  2. Will other people on the project need to install it too?
  3. Does it handle the size of files you work with, such as large access logs?
  4. Is it maintained, with recent releases and a clear licence?
  5. Can you get the same result with a flag on the classic tool?

A sensible pattern is to use the newer tools interactively for comfort, and write shared scripts with the classic tools so they run anywhere.