3

Here is the ls -l after I did rm -f inside the cur and new directories. I expected the directory "sizes" to shrink back to the default "4096".

[root@example Maildir]# pwd
/var/qmail/mailnames/example.com/noreply/Maildir
[root@example Maildir]# ls -l
total 28688
drwx------ 2 popuser popuser  1179648 Dec 27 09:55 courierimapkeywords
-rw-r--r-- 1 popuser popuser       16 Feb  8  2010 courierimapsubscribed
-rw-r--r-- 1 popuser popuser    29593 Dec 27 09:54 courierimapuiddb
-rw-r--r-- 1 popuser popuser  8156862 Dec 20 18:28 courierpop3dsizelist
drwx------ 2 popuser popuser 11907072 Dec 27 09:54 cur
-rw------- 1 popuser popuser      495 Dec 27 10:08 maildirsize
drwx------ 2 popuser popuser  8040448 Dec 27 10:08 new
drwx------ 2 popuser popuser     4096 Dec 27 10:08 tmp

Is this normal?

Can I leave this alone?

1 Answer 1

4

Whatever filesystem you are using doesn't have the ability to shrink directories (or it's not enabled). You can work around this as follows:

  1. Create a new directory in this directory's parent directory.
  2. Move the contents of the old directory into the new directory.
  3. Remove the old directory.
  4. Rename the new directory to the same name as the old directory.
3
  • Thank you. Appears to be vzfs. This is on a VPS host. May I know if that number of bytes is really being occupied on disk? Or can I just ignore it?
    – Doochz
    Dec 27, 2012 at 11:18
  • It probably is being used. Only way to check for sure is to do as suggested by David Schwartz.
    – fpmurphy
    Dec 27, 2012 at 23:17
  • Doesn't directly answer your question, but it maybe helpful to cd into the directory and use "du" to get the true size of the files in the directory just for a sanity check. Apr 16, 2016 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .