The directory is empty on Linux, but the capacity is large. Why?

Question: Question:

I'm using CentOS6, but I've been researching the capacity of the disk and found a directory with 8MB, even though it's an empty directory.
Is there any file process etc. that existed before as shown on this site ?

[root@XXXXXX 20170501]# ls -al -h
合計 7.9M
drwxr-xr-x  2 root root 7.9M  5月  2 00:05 2017 .
drwxr-xr-x 98 root root  20K  8月  4 11:05 2017 ..

Answer: Answer:

Perhaps there were many files and directories in that directory before.
If the file system is Ext4, once the number of blocks used in a directory increases, even if the files and directories under it are deleted, the blocks used in that directory will not decrease.

Scroll to Top