On 23-09-2009, at 08h 21'35", Kyle Wheeler wrote about "Re: How to remove empty maildir?" > On Wednesday, September 23 at 08:16 PM, quoth Wu, Yue: > >Hi, list, question is how to use some commands(i.g. shell commands) to remove > >the empty maildirs, i.e. no any file in maildirs' new/ cur/ and tmp/? > > If you know it won't be re-created or delivered to while you're > fussing with it, you can just use `rm -r maildirname` or even `rmdir > maildirname/new maildirname/cur maildirname/tmp maildirname` >
To remove all empty directories just type rm -rf `find -type d -empty` or find -type d -empty -exec \rm -fr {} \; at your (ba)sh prompt. Ionel