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
catfilename
catConcatenate and display - shows file contents to the terminal.
Terminal
C:\Users\User>cat filename

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
catfile1file2
file1 file2Multiple files - cat displays them one after another.
Terminal
C:\Users\User>cat file1 file2

Merge files on screen:

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

Quick Tips


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.