Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why does Ubuntu, and any other unix system for that matter what you to use "remove recursively" for folders or copy recursively. I can only imagine it's a security thing but the name recursive doesn't imply such a thing.

share|improve this question
up vote 8 down vote accepted

It is mostly for historical reasons. The following is a slightly modified extract from an excellent article named A Brief History of the 'rm' and 'rmdir' commands.

A new version of rm, dated January 20, 1973, included these options:

  • rm -f: don't ask before removing read-only files
  • rm -r: recursively remove subdirectories

The way the rm -r option was implemented at that time, when rm encountered a directory among the files it was removing, it would cd (then called chdir) to that directory and start another instance of rm -r * to remove its contents.

A version which did the recursion within a single rm process appeared in the Seventh Edition of Unix in 1979.

More about the history of rm can be found by following the link above.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.