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


Groups > comp.lang.python > #10825

Re: Hardlink sub-directories and files

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'suppose': 0.05; 'casual': 0.09; 'mentions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'rule.': 0.09; 'solaris,': 0.09; 'subject:files': 0.09; 'exception': 0.12; 'wed,': 0.12; 'am,': 0.13; 'things.': 0.13; 'wrote:': 0.15; '10.5': 0.16; '11:32,': 0.16; 'efficiently.': 0.16; 'filesystem': 0.16; 'from:addr:acm.org': 0.16; 'iirc,': 0.16; 'incremental': 0.16; 'received:198.144': 0.16; 'url:blog': 0.16; '>>>': 0.16; 'meant': 0.17; "wouldn't": 0.17; 'aug': 0.19; 'once,': 0.19; 'singh': 0.19; 'loop': 0.22; 'trying': 0.23; 'assume': 0.23; 'additionally': 0.23; 'structure': 0.23; 'tue,': 0.23; 'versions': 0.23; 'creating': 0.24; 'explains': 0.25; 'says': 0.25; 'specifically': 0.26; 'right.': 0.28; 'second': 0.29; 'false.': 0.30; 'over.': 0.30; 'user.': 0.31; 'received:198': 0.32; 'entry': 0.33; "i've": 0.33; 'to:addr:python-list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'there': 0.34; 'richard': 0.34; 'all.': 0.35; 'solaris': 0.35; 'pretty': 0.35; 'machine': 0.35; 'charset:us-ascii': 0.36; 'file': 0.36; 'some': 0.37; 'but': 0.37; 'several': 0.37; 'could': 0.37; 'using': 0.37; 'received:org': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'think': 0.38; 'header:Mime-Version:1': 0.39; 'manually': 0.39; 'except': 0.39; 'to:addr:python.org': 0.39; "couldn't": 0.40; 'prevent': 0.40; 'did': 0.40; 'where': 0.40; 'kind': 0.60; 'link': 0.63; 'article': 0.76; 'enforced': 0.84; 'stevens': 0.84; 'trees.': 0.84; 'edwards': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ned Deily <nad@acm.org>
Subject Re: Hardlink sub-directories and files
Date Wed, 03 Aug 2011 12:57:23 -0700
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> <j1blk1$gvo$1@reader1.panix.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host baybryj.net
User-Agent MT-NewsWatcher/3.5.3b3 (PPC Mac OS X)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1862.1312401461.1164.python-list@python.org> (permalink)
Lines 49
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312401461 news.xs4all.nl 23936 [2001:888:2000:d::a6]:40714
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10825

Show key headers only | View raw


In article <j1blk1$gvo$1@reader1.panix.com>,
 Grant Edwards <invalid@invalid.invalid> wrote:
> 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.

FWIW, Apple implemented directory hard links for HFS+ file systems in 
Mac OS X 10.5 specifically to make the Time Machine incremental backup 
system work efficiently.  The hard directory links are, of course, not 
meant to be used by the casual user.  The section "Directory Hard Links" 
in this blog entry from Amit Singh explains what restrictions are 
enforced on directory hard links to prevent cycles:

http://osxbook.com/blog/2008/11/09/hfsdebug-40-and-new-hfs-features/

-- 
 Ned Deily,
 nad@acm.org

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