On Fri, May 04, 2007 at 10:48:48AM +0100, Paul wrote:
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..
Yes, I thought I'd said that with my last sentence above. However it still seems that it's close to useless. :-)