Categories
Linux Tutorial Series

Linux Tutorial Series – 42 – The cat command

Here is the video version, if you prefer it:

The cat command is used to view contents of a file. More specifically, the cat command reads the contents of one or more files and copies them to standard output. (Shotts, 2019)⁠ 

Here is an example of its usage:

mislav@mislavovo-racunalo:~/Documents$ cat test.txt

Something

Something on another line

This was a short text file, but for large files, output of cat is messy. There are other commands (such as less) which also show you the contents of a file, but in a much more convenient fashion. We will talk about these other commands very soon.

Hope you learned something new!

References

Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Pages 83-85