cat

The shell command that prints the contents of one or more files to the terminal.

In more detail

Its name comes from concatenate, because given several files it prints them one after another. It is the quickest way to look at a small text file without opening an editor.

Examples

cat by-hand/server.conf reveals the duplicated line a script appended twice.
cat out.txt
cat .git/HEAD
The name comes from concatenate, because it can join several files into one stream. On Linux it is the quickest way to read small text files and live kernel files, such as cat /proc/cmdline. Its output reflects the file at the moment of reading, which for /proc and /sys can change between runs.

Related terms

Taught in

References

Certification courses