Re: Definition of struct stat st_size for directories

From: Christian Weisgerber <naddy_at_mips.inka.de>
Date: Sun, 13 Feb 2022 16:19:06 UTC
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