Hi, If I have the following directory structure:
> mkdir -p a/a1 a/a2 If I then remove these empty directories using the --parents option, rmdir reports an error: > rmdir --parents a/a1 a/a2 rmdir: failed to remove directory `a': Directory not empty Despite the error, the command completes with the desired result. It is pretty obvious what is happening: rmdir is treating each argument in isolation: 1. argument 'a/a1' 1.1. attempt to remove 'a/a1': success 1.2. attempt to remove 'a': error as directory not empty 2. argument 'a/a2' 2.1. attempt to remove 'a/a2': success 2.2. attempt to remove 'a': success However I would expect the parent directory removal to happen after the arguments are removed, which would result in a better user experience. For example: 1. argument 'a/a1' 1.1. attempt to remove 'a/a1': success 1.2. remember parent 'a' 2. argument 'a/a2' 2.1. attempt to remove 'a/a2': success 2.2. parent 'a' already in set of parents 3. remembered parent 'a' 3.1. remove parent 'a': success Many thanks, Paul.