CMD Master
Back to Blog
Arnošt Havelka

Reading Files with cat

Use cat to quickly view file contents in the terminal.

Start Interactive Lesson
Reading Files with cat

The cat command reads and displays file contents. It's the fastest way to peek at what's inside a file.

View a Single File

Use cat followed by a filename to see its entire contents.

Try the command

View a file's contents!

Build the command
cat
Terminal
C:\Users\User>cat file.txt

See what's inside:

Command Prompt
C:\Users\User>cat notes.txt

View Multiple Files

Combine multiple files to see them all at once.

Try the command

Combine multiple files!

Build the command
cat
Terminal
C:\Users\User>cat file1.txt file2.txt

Merge files on screen:

Command Prompt
C:\Users\User>cat intro.txt content.txt

Quick Tips

  • cat is perfect for small files
  • For long files, use less (page through with space/arrow keys)
  • cat shows everything at once - it won't pause if the file is long

Knowledge Check

1 / 3

What does cat do?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Creating Files with touch

Use touch to quickly create empty files.