What is the cat Command in Linux?
The cat
command stands for concatenate. It is used to read, concatenate, and write teh contents of files to the standard output (ususally the terminal)./ It is one of the most commonly used commands in Linux for viewing fule contents.
Basic syntax:
cat [option] [file]
Example:
cat file-name
Options
Option | Description |
---|---|
-A, —show-all | Equivalent to -vET, showing non-printing characters (except for spaces and tabs), end of lines, and tabs |
-b, —number-nonblank | Number all non-empty output lines |
-E, —show-ends | Display a dollar sign $ at the end of each line |
-n, —number | Number all output lines |
-s, —squeeze-blank | Suppress repeated empty output lines |
-T, —show-tabs | Display TAB characters as ^I |
-v, —show-nonprinting | Use ^ and M- notation, except for LFD and TAB characters |
Additional Help
You can explore more by using the commands:
cat --help
# or
man cat
Thank you!
Thank you for your time and for reading this!