•Arnošt Havelka
Reading Files with cat
Use cat to quickly view file contents in the terminal.
Start Interactive LessonReading 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.
Usage:catfilename
cat
Concatenate and display - shows file contents to the terminal.
See what's inside:
Command Prompt
C:\Users\User>cat notes.txt
View Multiple Files
Combine multiple files to see them all at once.
Usage:catfile1file2
file1 file2
Multiple files - cat displays them one after another.
Merge files on screen:
Command Prompt
C:\Users\User>cat intro.txt content.txt
Quick Tips
catis perfect for small files- For long files, use
less(page through with space/arrow keys) catshows everything at once - it won't pause if the file is long
Knowledge Check
1 / 3What does cat do?
References
These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.