2

When browsing the current folder, while it's empty, ls -lsa still shows that . is ~168kB in size

Is there any specific data related to this folder why it is that much in size?

  4 drwxr-xr-x 2 www-data www-data   4096 Dec 10 18:28 .
168 drwxrwxrwx 4 www-data www-data 167936 Dec 17 16:54 ..

1 Answer 1

2

Take a look:

Question:

What does size of a directory mean in output of 'ls -l' command?

Answer:

This is the size of space on the disk that is used to store the meta information for the directory (i.e. the table of files that belong to this directory). If it is i.e. 1024 this means that 1024 bytes on the disk are used (it always allocate full blocks) for this purpose.

Also consider that when you e.g. remove a file from a directory , only its contents vanish. The node remains in the directory structure, only being marked as free.

1
  • 1
    This is true; in fact, if you really want to shrink the directory (no good reason though!), you will have to do: rmdir DIR; mkdir DIR, and then you will see the standard 4KB size, not before. Dec 17, 2015 at 18:08

You must log in to answer this question.

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