Current folder size

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 ..

Sander

Posted 2015-12-17T16:01:23.560

Reputation: 263

Answers

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.

duDE

Posted 2015-12-17T16:01:23.560

Reputation: 14 097

1This 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. – MariusMatutiae – 2015-12-17T18:08:43.620