Hi Chris
On Friday 04 May 2007 10:33, Chris G wrote:
If you give the command "rmdir -p mdf/*" then it gives the error "rmdir: mdf: Directory not empty" twice but does actually remove the whole maildir folder. What's happening is that it removes each of the 'cur', 'tmp' and 'new' sub-directories of 'mdf' but only when it removes the last one does it also remove the parent directory.
From the man page, we see that:
-p, --parents Remove DIRECTORY and its ancestors. E.g., ‘rmdir -p a/b/c’ is similar to ‘rmdir a/b/c a/b a’.
So, assuming a mdf/cur mdf/new, and mdf/old layout, `rmdir -p mdf/*` would indeed complain when it removes cur & new. When it removes old, mdf would then be empty, so that too would be deleted..
Regards, Paul.