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. On 22 March 2015 at 07:50, Hardy Flor <HFlor at gmx.de> wrote:> Hello Samuel, > > with mdbox as Maildir no direct file operations should beperforms. For > empty mailboxes that will ever happen, the "doveadm mailbox delete" deletes > the emails, if required in the mailbox. > > Hardy > > > Am 21.03.2015 um 11:48 schrieb Samuel Williams: > >> Thanks Hardy. I have 1600 folders to delete.. in the end I did find -type >> d >> -name "* 1" -exec rm -r {} \; >> >>
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 {} \; instead of rm -r, this will delete only really empty directories (no files, no hidden files). Have a good day, -- CHUNKZ.NET - dodgy DIYer and computer technician Bertrand Caplet, Flers (FR) Feel free to send encrypted/signed messages Key ID: FF395BD9 GPG FP: DE10 73FD 17EB 5544 A491 B385 1EDA 35DC FF39 5BD9
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