rm
Program: rm
Removes files and directories.
Usage
rm [OPTION]... [FILE]...
Description
Remove each FILE. Directories only with -r (with all they contain) or with -d (when empty).
Options in the simulator
5 more options of the real program, not in the simulator yet
Examples
rm Downloads/invoice.pdf
ls Downloads
photo.jpg ls projects/website
index.html server.log style.css
rm -r projects/website
ls projects ls projects/shop/*.log
projects/shop/build.log projects/shop/test.log
rm projects/shop/*.log
ls projects/shop
README.md app.conf releases ls Downloads
manual.pdf photo.jpg setup.sh
rm -i Downloads/setup.sh
rm: remove regular file 'Downloads/setup.sh'? y
ls Downloads
manual.pdf photo.jpg Where you learn it
Lessons
- Deleting without regrets Terminal start
- Deleting without regrets Terminal start
- Delete, link, measure Linux Basics, Module 2: Files and directories