Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 1995 15:07:19 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        wsantee@wsantee.oz.net (Wes Santee)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Any way to get hard links to directories?
Message-ID:  <199506270537.PAA17528@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199506270455.VAA05388@wsantee.oz.net> from "Wes Santee" at Jun 26, 95 09:55:31 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Wes Santee stands accused of saying:
> 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?

Yes. FSCK will spew at you, and may digest your filesystem.  I haven't
tried this under 2.0.5, so the situation may have changed.

There is _never_ a good reason to hard-link directories.

Think about what would happen to a recursive-descent algorithm
confronted with a directory linked to one of its parents.

Having said that, as root you _can_ create a hard link to a directory.
I'd do it just _after_ a backup.

> ( -Wes Santee                        | You're never dead 'til you're )

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and                                      [[
]] realtime instrument control          (ph/fax) +61-8-267-3039         [[
]] My car has "demand start" - Terry Lambert                            [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506270537.PAA17528>