cat

Print or concatenate files

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Concatenates files to standard output. Also used to create small files with redirection.

Common flags
FlagMeaning
-nNumber all lines
-AShow non-printing characters, tabs and line ends
-sSqueeze repeated blank lines
Examples
cat /etc/os-releaseShow a file · explain & risk-check →
cat a.txt b.txt > all.txtConcatenate into a new file · explain & risk-check →
Pro tip

Useless use of cat: prefer `grep pattern file` over `cat file | grep pattern`.

Related
less head tail tee
Open the full explainer →More in Files & Archives

Reference text is hand-written and may be incomplete — check man cat for your version. Test destructive commands on a non-production system first.