Shell Command Explainer

Understand a command before you run it: every program, option, argument, pipe, redirection and && or || step explained, plus a safety check.

S'executa al teu navegador. Els fitxers mai no surten del dispositiu. Mira com comprovar-ho

…

Com es fa

  1. 1
    Choose the shell

    Select bash / zsh / sh or PowerShell.

  2. 2
    Paste the command

    Paste the command line into the box, or try one of the examples.

  3. 3
    Read the safety check

    Look at any critical, high or medium findings first.

  4. 4
    Follow the stages

    Read each command card in order, including what joins the stages.

  5. 5
    Check each argument

    Use the argument tables to see what every flag, path and redirection does.

  6. 6
    Save for later

    Press Save to notebook to keep the command and its explanation handy.

Sobre aquesta eina

Commands copied from documentation, forums or chat answers are often long one-liners full of short flags, pipes and redirections. Running one you do not understand is how files get deleted or permissions get broken. This explainer breaks the command apart the way the shell does. It splits quoted words, separates pipelines and lists joined by &&, || and semicolons, recognises redirections such as 2>&1 and here-strings, and then describes every program and option it knows: more than 80 common Unix tools and the most used PowerShell cmdlets and aliases. Combined short flags such as -rf are expanded. A safety check highlights patterns that delete, overwrite, format, change permissions widely or run downloaded scripts. The page only reads text; it never runs anything.

Who this is for

Developers, system administrators, students learning the command line and anyone about to paste a command from the internet into a terminal.

How the command is split

The tokenizer follows the POSIX shell rules for quoting: single quotes keep text literally, double quotes allow variables, backslashes escape the next character, and $(…) and backticks stay inside their word. Operators | and |& join commands into a pipeline; &&, ||, ; and & join pipelines into a list. Redirections like >, >>, 2>, &> and <<< are listed separately with their effect. Variable assignments before a command apply only to that command.

Explanations

Each command card shows the program's purpose and a table of its arguments. Known options get their meaning; unknown ones are marked as options so you know to check the manual. Paths, URLs, globs, variables and command substitutions are labelled. A quoted glob is shown as passed literally to the program, while an unquoted one is expanded by the shell. Wrappers such as sudo, env, nohup and time are explained and then the wrapped command. For xargs and sh -c, the inner command is named too.

PowerShell

In PowerShell mode, cmdlets are recognised by their Verb-Noun names and by aliases such as ls, gci, rm, del, iwr and iex, which are shown with their full names. Parameters may be abbreviated, as PowerShell allows.

The safety check

Findings are graded critical, high, medium or info. Critical patterns include recursive deletion of the root, home or current directory, writing to a disk device, creating file systems and the classic fork bomb. High findings include recursive deletes in general, downloading a script and piping it into a shell, find with -delete, world-writable permissions, removing all cron jobs, flushing firewall rules and encoded PowerShell commands. Medium findings include force pushes, hard resets, in-place sed edits and shutdowns. A notice explains that a single > overwrites a file.

Worked example

find . -name '*.log' -mtime +7 -print0 | xargs -0 du -ch | tail -n 1 is one pipeline of three commands. find searches the current directory for names matching the quoted pattern, modified more than 7 days ago, separated by NUL characters; xargs -0 reads that list safely and runs du -ch on it; tail -n 1 keeps the last line, the grand total. No warnings are raised.

Limits

Descriptions cover common GNU, BSD and PowerShell options, and flags differ between versions and platforms, so confirm with man, --help or Get-Help. Shell functions, aliases defined in your profile, loops and complex scripts are only partly understood. The safety check is a helpful filter, not a guarantee that a command is safe.

Exemple resolt

find … -print0 | xargs -0 du -ch | tail -n 1: 3 commands, 1 pipeline, no warnings.

En resum

Preguntes freqüents

Does this tool run my command?

No. It only parses and explains the text in your browser.

Which shells are supported?

POSIX-style shells such as bash, zsh, dash and sh, and PowerShell 5 and 7.

What does 2>&1 mean?

Send error output (file descriptor 2) to the same place as normal output (descriptor 1).

What is the difference between && and ;?

&& runs the next command only if the previous one succeeded; ; runs it regardless of the result.

Why is curl piped into bash flagged?

It downloads a script and runs it immediately, so you never see what it does. Download it, read it, then run it.

Can I keep commands I explained?

Press Save to notebook; saved commands stay in this browser and can be reopened.

Totalment gratisSense cost, sense registre
Els fitxers es mantenen privatsTot funciona al teu navegador
Fàcil en el teu idiomaDisponible en molts idiomes