literal meaning of "-r"

dotKer

Member
Joined
Aug 16, 2019
Messages
69
Reaction score
14
Credits
0
Code:
rm directoy
The shell script above doens't work.
However, the script below works fine.
Code:
rm -r directoy

I know that "rm" stands for remove.
I don't know for what "-r" stand.
What does "-r" stand for?


.
 


- r is the recursive option.
It will recursively remove directories and their contents.

For more information see the man page for rm using:
man rm
 
not to be confused with -R which is recursive permissions
Um...No it isn't!
Take a look at the man page for the rm command and you'll see that -r, -R and --recursive do exactly the same thing.

I think you're thinking of the chmod command. The OP is talking about the rm command.
 
Last edited:

Members online


Latest posts

Top