Rm vs rm - r

I was wondering if rm is used in command line it will delete a file or directory. But if it is used to delete a directory what happens to the child directories?
Do the child directories become inaccessible or are they also deleted?
If they are deleted what is the point of rm -r?

For almost any bash command, you can invoke the manual with the man command. In this case like this:

man rm

Saves waiting around for someone to notice your questions :grinning:

Okay, thanks. But just to confirm I type man in the terminal

Yes that’s right.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.