Deleting empty folders

@lbutlr kremels at kreme.com
Wed Apr 1 09:28:45 UTC 2015


On Apr 1, 2015, at 2:15 AM, Bertrand Caplet <bertrand.caplet at chunkz.net> wrote:
> Le 2015-04-01 01:16, Samuel Williams a écrit :
>> Hi Hardy, I had over 1600 folders, writing manually doveadm mailbox delete
>> would be a real pain. I guess I could script it but that's even more of a
>> pain. It would be nice if there was a command to remove empty mailboxes or
>> something similar.
> 
> Hi Samuel,
> 
> you could do:
> find -type d -name "* 1" -exec rmdir {} \;

find /path/to/clean -type d -empty -delete


-- 
'You don't think you've had enough, do you?' he said. I KNOW WHEN I'VE
HAD ENOUGH. 'Everyone says that, though. I KNOW WHEN EVERYONE'S HAD
ENOUGH. --Moving Pictures


More information about the dovecot mailing list