What Is Cat Command in Unix with Examples?
Contents Command Explanation Cat File1. Txt File2. Txt File3. Txt | Sort > Test4 Concatenate the Files, Sort the Complete Set of Lines, and Write the Output to...
Contents
| Command | Explanation |
|---|---|
| cat file1.txt file2.txt file3.txt | sort > test4 | Concatenate the files, sort the complete set of lines, and write the output to a newly created file |
| cat file1.txt file2.txt | less | Run the program “less” with the concatenation of file1 and file2 as its input |
What is use of cat command in Unix?
The cat (short for “concatenate“) command is one of the most frequently used command in Linux/Unix like operating systems. cat command allows us to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files.
What is cat command Linux?
If you have worked in Linux, you surely have seen a code snippet that uses the cat command. Cat is short for concatenate. This command displays the contents of one or more files without having to open the file for editing. In this article, learn how to use the cat command in Linux.