summaryrefslogtreecommitdiff
path: root/team-2/reading-a-file.txt
blob: 0473ac38b54a18299818715834de16210e1c484d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
= Reading a file

For reading short files, `cat` is suitable:

cat file-name

This outputs the contents of the file called `file-name`, if it exists. To
output the contents of a different file, use a different file name.

If it's a long file, you may find it useful to use `less` instead:

less file-name

This opens the file up for you to scroll through. You can scroll down with <d>,
up with <u>, and quit with <q>.