Clean Up the Downloads

Linux lab Beginner 4 tasks 10 points

The downloads directory is full of junk. Delete the junk, but be careful: don't delete anything important. Look before you delete.

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

If you delete something important by mistake, press Reset to start the lab again.

Solution explanation

rm downloads/*.tmp removes the six temporary files in one go, and nothing else. rmdir is the safe way to remove an empty directory, and rm -r removes a directory with its contents. Two files are left: boarding-pass.pdf and passport.pdf.

Show solution
ls downloads/*.tmp
rm downloads/*.tmp
rmdir downloads/old
rm -r downloads/cache
ls downloads
HOME LEARN COMMUNITY DASHBOARD