What does cat do?
cat prints the whole content of one or more files to the screen. It is also used to join files together.
cat [options] file…
Most useful options
| Option | What it does |
|---|---|
| -n | number every line |
| -A | show hidden characters (tabs, line ends) |
cat examples
In security work
Use cat for short files; for long logs, less or tail is faster.
Questions about cat
What is the difference between cat and less?
cat dumps the whole file at once; less lets you scroll and search page by page — better for big files.