I have a directory with 18 files in it, but stat
and other tools report its size as 0
. How is this possible?
$ \stat $PWD
File: `/home/users/gholl/checkouts_local/FCDR_HIRS/FCDR_HIRS/analysis'
Size: 0 Blocks: 0 IO Block: 524288 directory
Device: 14h/20d Inode: 62487444829821592 Links: 1
Access: (0755/drwxr-xr-x) Uid: (35063/ gholl) Gid: (26030/ users)
Access: 2018-04-09 11:38:43.574427000 +0100
Modify: 2018-04-09 11:38:43.574427000 +0100
Change: 2018-04-09 11:38:43.575000000 +0100
~/checkouts_local/FCDR_HIRS/FCDR_HIRS/analysis$ \ls -1 | wc -l
18
$ mount | grep homeusers
172.26.72.131:/homeusers on /home/users type nfs (rw,tcp,hard,intr,timeo=50,addr=172.26.72.131)
The machine is a Red Hat Enterprise Linux Server release 6.9 (Santiago). According to df -T
, the filesystem type is nfs
:
$ df -hT .
Filesystem Type Size Used Avail Use% Mounted on
172.26.72.131:/homeusers
nfs 200T 3.5T 197T 2% /home/users
I thought that the size of a directory was related to the number of files in it, as it stored their metadata. Then how can it be zero for a non-empty directory?
NB: I don't have access to the server and I don't have superuser powers, so I cannot investigate what happens server-side.
stat
on the NFS server? What operating system does the NFS server run? What filesystem does it use? – Wouter Verhelst Apr 9 '18 at 16:20mount | grep homeusers
. – Yurij Goncharuk Apr 9 '18 at 16:46