$ cat
Concatenate files and write them to standard output
DOCUMENTEDViewing filesUbuntu 24.04 LTS baseline
Synopsis
cat [OPTION]... [FILE]...
What it does
- `cat` reads files in order and writes their contents to standard output.
- For interactive viewing of long files, a pager such as `less` is usually more suitable.
Examples
Display a file
cat /etc/hostnameConcatenate two files
cat part1.txt part2.txt > combined.txtImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.