rmdir deletes only an empty directory. To delete recursively, rm -rf is used.
- Why doesn't
rmdirhave a recursive option? Logically, when I am deleting a directory, I want to usermdir. - Given that
rmis used for deleting a directory in all but the simplest case, why doesrmdireven exist? The functionality is subsumed inrm.
Is this just a historical accident?