Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2022 17:19:06 +0100
From:      Christian Weisgerber <naddy@mips.inka.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Definition of struct stat st_size for directories
Message-ID:  <YgkvesuwegqERLw0@lorvorc.mips.inka.de>
In-Reply-To: <YgczTldqDaKNUwEp@raf.org>
References:  <YgczTldqDaKNUwEp@raf.org>

next in thread | previous in thread | raw e-mail | index | archive | help
raf:

> The FreeBSD stat(2) manpage only defines st_size for
> regular files and symlinks. But I've noticed that for
> directories, it seems to always be the number of
> entries within the directory (including . and ..). I'm
> seeing this with 13.0-RELEASE and zfs.

Here on UFS it's some multiple of 512, e.g.

$ stat -f '%N %z' / ~
/ 1024
/home/naddy 3584

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YgkvesuwegqERLw0>