cat
is one of the frequently used commands in Linux. It is used to see the contents of a file on standard output (sdout). To run this command, enter cat
followed by the filename and extension. For example: cat file.txt
Here are other ways to use the cat
command:
cat > filename
creates a new filecat file1 file2 > file3
merge two files (1 and 2) and store the result in a new file (3)cat filename | tr a-z A-Z > result.txt
to change a file to upper or lower case