Capture Everything
The ship's computer needs some records. Save output into files with >, >> and 2>. Create every file in your home directory.
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.
Hints
Check a file at any time with cat.
Solution explanation
> creates etc.txt and >> adds a line to it. 2> catches only the error message, while > both.txt 2>&1 sends the output to the file and the errors after it. 2>/dev/null throws the Permission denied messages away.
Show solution
ls /etc > etc.txt
echo "END OF LIST" >> etc.txt
wc -l etc.txt
ls /etc/hostname /etc/treasure 2> errors.txt
ls /etc/hostname /etc/treasure > both.txt 2>&1
find /etc /root -name 'host*' 2>/dev/null