Categories
Linux Tutorial Series

Linux Tutorial Series – 36 – The rm command

Here is the video version, if you prefer it:

The rm command is used to delete files and directories. (Shotts, 2019) It is used as follows:

rm item1 …

where item1 can be either a file or a directory, and signifies you can specify multiple files or directories.

Two options I found very useful with rm: -i is used to prevent rm from silently deleting files by prompting you before actually deleting them and -r is used for recursive deletion (meaning that both a directory and its subdirectories will be removed).⁠

Be very careful with rm! Let me say that again: Be very careful with rm! rm does not forgive! I highly recommend checking out (“Where do files go when the rm command is issued?,” n.d.)

Hope you don’t accidentally delete some files with rm and hope you found this useful!

References

Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Pages 55-57

Where do files go when the rm command is issued? (n.d.). Retrieved January 6, 2020, from https://unix.stackexchange.com/questions/10883/where-do-files-go-when-the-rm-command-is-issued

NewsletterUpdates on interesting things I am doing

Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.

Leave a Reply

Your email address will not be published. Required fields are marked *