bin/rmdir -p option bug [patch]

Douwe Kiela virtus at
Thu Jul 22 11:38:28 PDT 2004

Hey peeps,

According to SUSv3, the -p option should behave exactly the same as rmdir
without any option, only that it recursively removes all directories
as arguments in the command line. In the current rmdir, you can't remove
multiple directories and meanwhile recursively remove all it's

This doesn't work:

daedalus# rmdir -p ./a ./z
rmdir: ./a: Directory not empty
rmdir: ./z: Directory not empty

while these directories are completely empty, except for other empty
SUSv3 states, aswell as the manual page:

Remove all directories in a pathname

This is due to an error in the rmdir source code in the loop that handles
line arguments. A patch can be found here:


More information about the Submit mailing list