Unix Commands reference data

Common Unix/Linux shell commands and their usage.

  • 11 datasets
  • JSON · YAML · TOON
  • CC0 — public domain

Topic guide

What Unix Commands covers

Unix-command reference data collects the tools that make the shell productive: file and process commands, text processors such as grep, sed and awk, networking utilities, package managers, git for version control and the conventions of shell scripting. The commands are decades old and stable, but their flags differ between GNU/Linux, BSD and macOS, and shell syntax differs between bash, zsh and POSIX sh. Many everyday tasks reduce to composing small commands with pipes. The commands here are the common forms; always read the manual page for the system actually in use.

Key ideas

Pipe
The | operator connects one command's output to the next one's input, building pipelines from small tools.
Exit status
Every command returns a number: 0 for success and non-zero for failure. Scripts branch on it and set -e makes a failure stop the script.
Standard streams
Standard input, output and error (file descriptors 0, 1 and 2), which can be redirected with <, > and 2>.
Globbing vs regex
The shell expands wildcards such as *.txt before the command runs; grep, sed and awk interpret regular expressions themselves.
Quoting
Single quotes prevent all expansion, double quotes allow variable expansion, and unquoted variables are split on whitespace, a common source of bugs.
Permissions
Files carry read, write and execute bits for owner, group and others, set with chmod and shown by ls -l.
POSIX vs GNU
POSIX defines portable behavior; GNU tools add extensions (such as sed -i without a suffix) that BSD and macOS may not support.

Common pitfalls

  • Running destructive commands (rm -rf, git reset --hard, git clean) without checking the target and having a backup.
  • Parsing ls output or leaving variables unquoted, which breaks on filenames with spaces.
  • Assuming GNU flags work on macOS or BSD; check the manual page or use portable forms.
  • Using sed -i or in-place edits without a backup suffix on files you cannot recover.

Using it from an agent

  • Show the exact command and explain each flag; state the shell and OS assumptions.
  • Prefer a dry run (echo, -n, --dry-run) or a preview before destructive commands, and warn clearly about irreversible effects.
  • Quote variables and paths in examples to model safe habits.

Start with: Git Essential Commands · Unix File Operation Commands

Datasets in Unix Commands

Fetch this category

One request returns the category with all of its dataset summaries. Append ?format=yaml or ?format=toon for the other encodings.

GET https://yjtoon.com/api/category/unix-commands?format=json

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets