DEV Community

Cover image for cat Command in CLI
Baransel
Baransel

Posted on • Originally published at baransel.dev

cat Command in CLI

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 file
  • cat 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

Sign up to my newsletter!.

Top comments (0)