Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This does not make any sense!

user@localhost:~/folder$ du -h --max-depth=1
6.1M    ./subfolder
6.1M    .
user@localhost:~/folder$ ls -la subfolder
total 6228
drwx------ 2 user user 6369280 2013-07-08 16:03 .
drwx------ 9 user user    4096 2013-07-08 16:04 ..

du reports 6.1 megabytes, ls reports a total of "6228" (I don't know total of what)... but the folder is empty... indeed, there is no file there and it should be empty indeed.

Why is that? Can someone explain this to me?

This is happening in a VPS running Ubuntu 10.04

Thank you.

share|improve this question

You're looking at a result of how Ext2/3/4 filesystems work. The list of files (inodes) in the directory is kept as the directory 'file', represented as the . in the listing. After removing the files in the directory, the disk usage does not shrink.

Therefore, I assume you had a lot of files in the directory before (or you're omitting them in the ls output in your question). The only solution is to remove and recreate the directory to free up this space.

See also: Why could the size of the “dot file” /. exceed 4096?

For as to what the total 6228 means, see ls command: what does the first line mean?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.