Section 14.7 Display File Contents
Linux provides a convenient way to peek into a file without going through the hassle of opening it in an editor. This is somewhat similar to the preview pane that pops up in your file browser when you click on or hover over a file with your mouse.
The command less
displays contents of a file, one screen-full at a time. Once you see the first screen-full you can navigate through the file’s contents either using your cursor keys or advance by the page via the following:
Space Bar
advances one page
Ctrl+b
goes back one page
q
exits the less
program and returns you to the command prompt
Activity 14.8.
In the Practice Linux Window below, there is a file named "lookAtMe.txt" in the directory engs20
, which itself is located in your home directory. Which one of the words below is hidden in the file "lookAtMe.txt"?
Chocolate
Cookies
Coffee
Coconuts
If the server window does not load, please click here.