3 ms·
GNU ln has this ( https://man.archlinux.org/man/ln.1#d https://man.archlinux.org/man/ln.1#d ): -d, -F, --directory allow the superuser to attempt to hard
by yjftsjthsd-h 2y ago
GNU ln has this ( https://man.archlinux.org/man/ln.1#d https://man.archlinux.org/man/ln.1#d ):
-d, -F, --directory
allow the superuser to attempt to hard link directories (this will probably fail due to system restrictions, even for the superuser)
which implies that that's not quite an absolute limit. I don't see any comment either way on https://illumos.org/man/1/ln https://illumos.org/man/1/ln , but it's plausible that some version of Solaris had wiggle room; it's a terrible idea for obvious reasons, but there's really no hard technical reason why a system couldn't allow you to create hard links to directories.
- ryao 2y agoThe Solaris VFS is flexible enough for a filesystem to support this, but any filesystem that does violates POSIX according to a comment in ZFS. A check of the illumos UFS driver source code reveals that it violates POSIX by permitting root to do this. I wrote more about this with links to relevant illumos source code here: https://news.ycombinator.com/item?id=43447288 https://news.ycombinator.com/item?id=43447288