What does cat do?

concatenate files and print them.

▸ Explain your own cat command →

cat examples, explained

$ cat -n file.txt

  • catconcatenate files and print them
  • -nnumber every output line
  • file.txtan argument passed to the command

$ cat -A file.txt

  • catconcatenate files and print them
  • -Ashow non-printing characters, tabs and line ends
  • file.txtan argument passed to the command

cat flags & options

-nnumber every output line
-Ashow non-printing characters, tabs and line ends
-bnumber non-blank output lines

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.