Why am I able to cat a directory?

Matthew Dillon dillon at backplane.com
Sun Jan 22 22:57:44 PST 2023


To be more specific, most newer filesystems hash directory entries, and the
'seek' offset is a hash code... often quite a bit hash code (64 bits).
Which means that there is no linear file equivalent that read() can operate
on.   Only getdirentries() or getdents() works on these sorts of
directories (readdir() is a libc function which issues getdirentries()
internally).

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20230122/ae2e857e/attachment-0002.htm>


More information about the Users mailing list