I can't understand why ls -l
shows folder size less than block size.
For example:
[user@01 NEW]$ ls -l
total 4
drwxr-xr-x 5 root root 78 Apr 22 00:43 controllers
drwxr-xr-x 14 root root 4096 Apr 22 00:44 schemas
drwxr-xr-x 2 root root 38 Apr 22 00:44 spinner
"controllers" is a directory, and block size is 4096 bytes, so why size is 78 bytes?
[user@01 NEW]$ find controllers/ -type f | wc -l
73
Many files are inside. And du -hs
shows that size of this folder is 840 K.
Another strange thing is that ls -s
shows that for this two directories allocated 0 blocks:
[user@01 NEW]# ls -ls
total 4
0 drwxr-xr-x 5 root root 78 Apr 22 00:43 controllers
4 drwxr-xr-x 14 root root 4096 Apr 22 00:44 schemas
0 drwxr-xr-x 2 root root 38 Apr 22 00:44 skins
xfs_info:
xfs_info /
meta-data=/dev/disk/by-uuid/5d87d678-e4cc-445f-b770-4e4c0357faaa isize=256 agcount=4, agsize=393088 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=1572352, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
In ext4 folders size is normal (i.e., equal to block size).