If you would like to view all the contents of a file in a Linux system cat is one of the commands that can help out, in this article we’ll show some basic usage of the Linux cat command.
Show the contents of a file
cat myFile.txt
Show contents of more than one file
cat myFile.txt myFile-2.txt
Write text into a newly created file
cat > fileThatWillBeCreated
then start typing. Once finished press Ctrl + D to exit
Display notifications that can assist
cat -n myFile.txt # Will display number lines cat -e myFile.txt # Will display $ at each line ending cat -T myFile.txt # Will display each tabulation with ^I