Level 1
0 / 100 XP

Welcome — and a warning

1234567

Deleting is the one file operation you can't take back. Linux has no Recycle Bin or Trash at the command line — when you rm a file, it's gone. There's no undo.

So the golden rule is: look before you delete. Run ls first, double-check the name, then remove.

In this lab you'll practice the deletion commands and see the safety guardrails built into Linux:

  • rm — remove a file
  • rmdir — remove an empty folder (and refuse a non-empty one — a safety feature)
  • rm -r — remove a folder and everything inside it

Your files for this lab live in a projects folder inside your home directory — a scratch.txt, an empty-dir, and a full-dir that contains a file. First you'll move into projects, then start deleting.

Restoring lab progress…