Read the Journal

Linux lab Beginner 3 tasks 10 points

Some messages have been logged under the tag backup. Find them in the journal, count them, and save them to a file. (Reading the journal needs no sudo.)

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

-o cat drops the timestamp and hostname, leaving just the messages.

Redirect the same command to a file with > ~/backup.log.

Solution explanation

sudo journalctl -t backup filters the journal to the backup tag, and -o cat prints just the message text (one per line), so wc -l counts three. Redirecting that into ~/backup.log saves them. The other message has a different tag, so it isn't included.

Show solution
sudo journalctl -t backup --no-pager -o cat
journalctl -t backup -o cat | wc -l
sudo journalctl -t backup -o cat > ~/backup.log
tail -n1 ~/backup.log
HOME LEARN COMMUNITY DASHBOARD