The cat (short for “concatenate“) command is one of the most frequently used commands in Linux/Unix-like operating systems. cat command allows us to create single or multiple files, view content of a file, concatenate files and redirect output in terminal or files.
In this article, we are going to find out the handy use of cat commands with their examples in Linux.
General Syntax of Cat Command
$ cat [OPTION] [FILE]...
1. Display Contents of File
2. View Contents of Multiple Files in terminal
In below example, it will display the contents of the test and test1 file in the terminal.
cat test test1
3. Create a File with Cat Command
We will create a file called test2 file with the below command.
Thanks for reading ! Happy coding !