literal meaning of "-r"

dotKer

Member
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?


.
 


JasKinasis

Well-Known Member
- 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
 

JasKinasis

Well-Known Member
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


Top