Read the Ship's Papers

Linux lab Beginner 5 tasks 10 points

The captain left some papers in the papers directory. Read them with cat, head, tail and wc to answer the questions.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

Remember Tab completion for file names.

Solution explanation

cat is ideal for short files. For a long file, wc -l tells you how long it is (348 lines), tail -n 1 shows just the last line and head -n 5 just the first five.

Show solution
cat papers/door-code.txt
cat papers/rules.txt
wc -l papers/cargo.txt
tail -n 1 papers/cargo.txt
head -n 5 papers/cargo.txt
HOME LEARN COMMUNITY DASHBOARD