Get startedGet started for free

How can I view a file's contents?

Before you rename or delete files, you may want to have a look at their contents. The simplest way to do this is with cat, which just prints the contents of files onto the screen. (Its name is short for "concatenate", meaning "to link things together", since it will print all the files whose names you give it, one after the other.)

cat agarwal.txt
name: Agarwal, Jasmine
position: RCT2
start: 2017-04-01
benefits: full

This exercise is part of the course

Introduction to Shell

View Course

Exercise instructions

Print the contents of course.txt to the screen.

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise