How do we view the contents of an individual file in our terminal? We can use cat.

The cat command outputs the contents of a specified file. For example:

cat action/superwoman.txt

will output all the text from superwoman.txt.

This is a useful command for peeking at files without opening them, and confirming the result of other commands that change the contents of files.

Try it out below!



In a single command (without using the cd command), use cat to output what’s inside terminator.txt.

Note: To accomplish this in one command, make sure you are writing a relative path from the current directory, movies/. Refer to the file directory image!


In a single command, use cat to output what’s inside fight-club.txt.

Note that there is nothing yet in the file, so the output should be empty.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?