Date: Tue, 27 Jun 1995 21:48:17 -0600 From: dkelly@iquest.com (David Kelly) To: Wes Santee <wsantee@wsantee.oz.net>, freebsd-questions@freebsd.org Subject: Re: Any way to get hard links to directories? Message-ID: <v01510102ac1675641e20@[204.177.193.231]>
next in thread | raw e-mail | index | archive | help
At 21:55 6/26/95, Wes Santee wrote: >Okay, I know that you aren't supposed to be able to create a hard >link to a directory. In the ln(1) man page, however, it states that >"Hard links may not normally refer to directories and may not span >filesystems." > >Does that mean there is some way to create hard links to directories >in a 'non-normal' way? If so, are there consequences? Dot and dot-dot are hard links to directories. Each subdirectory has a hard link to its parent (dot-dot) in addition to a hard link to itself (dot). You can see the hard link count in an "ls -l" listing and get a good idea how many subdirectories are under a directory (2 less than the link count). I think this is what was meant by, "Hard links may not normally refer to directories..." as the writer was being exactly precise and accounting for the dot and dot-dot links. You should not make hard directory links but is OK for mkdir and fsck. -- David Kelly N4HHE, n4hhe@amsat.org, dkelly@iquest.com ---------------------------------------------------------------- The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01510102ac1675641e20>