> /etc/passwddangerBlank the account database with a stray redirect.
▸ Inspect this command in the risk checker →$ > /etc/passwd
What it does
An empty redirect opens /etc/passwd for writing, which truncates it to zero length before anything is written — instantly emptying the file that maps usernames to accounts.
Why it's dangerous
With /etc/passwd blank, logins, sudo and many services break, and you can lock yourself out of the machine entirely. It happens the instant you press Enter, with no output.
Safer alternative
Never redirect onto system files. To append a line use a tool that edits in place (`sudo vipw` for passwd), and when adding output to a file prefer `>>` after double-checking the target path.
Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.