Learn
Manipulation
cat
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!
Instructions
1.
In a single 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/.
2.
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.