Module lessons (3/3)
Deleting resources (rm)
Remove files and entire folders recursively (-r) and forcefully (-f) using rm.
What you'll learn in this lesson
- Delete single files or multiple files at once using
rm(Remove). - Remove folders with their entire subtree via the
-rrecursive option and understand the effect of-f(force). - Apply rigorous preventative checks before executing destructive commands, knowing that the terminal does not use the recycle bin.
Overview
In the Linux terminal, the rm (Remove) command is immediate and definitive: it does not move the items to the desktop trash, but immediately detaches the file or folder from the file system. Using it methodically and preventively is a critical skill for working in production.
You can list multiple names separated by space (or in real shell use checked patterns after testing them with echo/ls):
Sections covered in this lesson
- 1Variants of
rmand behavior on the VFS - 2Progressive examples
- 3Practical exercises
- 4Quick check
Unlock "Deleting resources (rm)" and the full Linux Terminal curriculum
Remove files and entire folders recursively (-r) and forcefully (-f) using rm.
Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Linux Terminal plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.