Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10807

Re: Hardlink sub-directories and files

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Hardlink sub-directories and files
Date 2011-08-03 14:22 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <j1blk1$gvo$1@reader1.panix.com> (permalink)
References <3d2c3d3b-085e-4f3b-903d-726a31e607f4@b34g2000yqi.googlegroups.com> <4E37CDCF.7060501@jollybox.de> <CAGGBd_qm3_wamKNv2LW5giYKmMpyHFoo=Y-8kXZZLmxPPk3G3A@mail.gmail.com> <mailman.1822.1312353150.1164.python-list@python.org>

Show all headers | View raw


On 2011-08-03, Kushal Kumaran <kushal.kumaran+python@gmail.com> wrote:
> On Wed, Aug 3, 2011 at 7:29 AM, Dan Stromberg <drsalists@gmail.com> wrote:
>>
>> On Tue, Aug 2, 2011 at 3:13 AM, Thomas Jollans <t@jollybox.de> wrote:
>>>
>>> On 02/08/11 11:32, loial wrote:
>>> > I am trying to hardlink all files in a directory structure using
>>> > os.link.
>>> >
>>> > However I do not think it is possible to hard link directories ?
>>
>> That is pretty true.?? I've heard of hardlinked directories on Solaris, but
>> that's kind of an exception to the general rule.
>
> In APUE, Richard Stevens says only root could do this,

Yep, in early versions of Solaris root could hard-link directories.
I did it once, and it's not something one did a second time.  fsck
couldn't deal with it and pretty much fell over.  IIRC, the only way
to recover was to clear several inodes manually and then let fsck
salvage things.

> if it is supported by the system at all.  In a footnote, he
> additionally mentions he screwed up his filesystem by creating a loop
> of hardlinked directories while writing that section of the book.

That sounds about right.

> I suppose it is a good thing systems don't allow that now.

It wouldn't be a problem, except there are some important places in
Unix where it is assume that filesystems are trees.  Hard linking
directories causes that assumption to be false.

-- 
Grant Edwards               grant.b.edwards        Yow! Somewhere in DOWNTOWN
                                  at               BURBANK a prostitute is
                              gmail.com            OVERCOOKING a LAMB CHOP!!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Hardlink sub-directories and files loial <jldunn2000@gmail.com> - 2011-08-02 02:32 -0700
  Re: Hardlink sub-directories and files Peter Otten <__peter__@web.de> - 2011-08-02 12:01 +0200
  Re: Hardlink sub-directories and files Thomas Jollans <t@jollybox.de> - 2011-08-02 12:13 +0200
  Re: Hardlink sub-directories and files Tim Chase <python.list@tim.thechases.com> - 2011-08-02 06:17 -0500
  Re: Hardlink sub-directories and files Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-08-02 21:46 -0700
  Re: Hardlink sub-directories and files Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2011-08-03 12:02 +0530
    Re: Hardlink sub-directories and files Grant Edwards <invalid@invalid.invalid> - 2011-08-03 14:22 +0000
      Re: Hardlink sub-directories and files Thomas Jollans <t@jollybox.de> - 2011-08-03 17:08 +0200
      Re: Hardlink sub-directories and files Ned Deily <nad@acm.org> - 2011-08-03 12:57 -0700
  Re: Hardlink sub-directories and files Nobody <nobody@nowhere.com> - 2011-08-03 08:04 +0100
  Re: Hardlink sub-directories and files Thomas Jollans <t@jollybox.de> - 2011-08-03 11:47 +0200
  Re: Hardlink sub-directories and files Thomas Jollans <t@jollybox.de> - 2011-08-03 20:49 +0200
  Re: Hardlink sub-directories and files Thomas Jollans <t@jollybox.de> - 2011-08-03 23:54 +0200
  Re: Hardlink sub-directories and files Alexander Gattin <xrgtn@yandex.ru> - 2011-08-08 10:07 +0300

csiph-web