From owner-freebsd-questions Tue Jun 27 19:48:02 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id TAA15149 for questions-outgoing; Tue, 27 Jun 1995 19:48:02 -0700 Received: from vespucci.iquest.com (root@vespucci.iquest.com [199.170.120.42]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id TAA15143 for ; Tue, 27 Jun 1995 19:47:59 -0700 Received: from [204.177.193.231] (n4hhe.iquest.com [204.177.193.231]) by vespucci.iquest.com (8.6.9/8.6.9) with SMTP id VAA27197; Tue, 27 Jun 1995 21:48:14 -0500 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 27 Jun 1995 21:48:17 -0600 To: Wes Santee , freebsd-questions@freebsd.org From: dkelly@iquest.com (David Kelly) Subject: Re: Any way to get hard links to directories? Sender: questions-owner@freebsd.org Precedence: bulk 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.