dimanche 22 mars 2015

Why is rm -r the same as rm -R?


If you look in the rm man page you see that rm -r, rm -R, and rm --recursive are all the same.



-r, -R, --recursive
remove directories and their contents recursively


When using options, I'm used to them being case sensitive where quite often a different case will have a (often completely different) purpose. This can even be seen in rm where rm -i is equivalent to rm --interactive=always and rm -I is equivalent to rm --interactive=once.


Are there any historical reasons for both the -r and -R options being the same as --recursive? Are there any reasons for using one over the other (such as compatibility across systems)?



Aucun commentaire:

Enregistrer un commentaire