xfs
[Top] [All Lists]

Re: Hard Links

To: "Quang Nguyen (Ngo)" <quang.nguyen@xxxxxxxxxxxx>
Subject: Re: Hard Links
From: Jean Francois Martinez <jfm2@xxxxxxxxxxxxxxxx>
Date: Wed, 12 Dec 2001 20:16:40 +0100
Cc: "'Steve Lord '" <lord@xxxxxxx>, "''linux-xfs@xxxxxxxxxxx' '" <linux-xfs@xxxxxxxxxxx>
References: <ACD4093EB009D411BC8A009027D7699660A16F@xxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
"Quang Nguyen (Ngo)" wrote:
> 
> If I remember correctly, NextStep did provide hardlinks to directories.  I
> wonder if OSX's native FS does support them.  Anyway, I'm writing a backup
> utility, so I thought I might need to pay attention to them in case, they're
> there.

The fact NextStep allowed it doesn't meant it was good thing.  Linux
designers
decided as soon as 1993 perhaps even in 1992 that this was a braindamage
so
Linux is one of the few Unixes (perhaps the only one) where not even
root can
create hard links to directories.  It was not lack of resources who
prevented 
hard links to directories (in Minix the code for this was ten lines or
so).

> 
> Thanks,
> Quang
> 
> -----Original Message-----
> From: Steve Lord
> To: Quang Nguyen (Ngo)
> Cc: 'linux-xfs@xxxxxxxxxxx'
> Sent: 12/11/01 12:12 PM
> Subject: Re: Hard Links
> 
> On Tue, 2001-12-11 at 14:08, Quang Nguyen (Ngo) wrote:
> > Is XFS going to support hard links to directories?
> >
> > # ln -d dir dirLink
> >
> > returns
> >
> > ln: creating hard link `../dirLink' to `dir': Operation not permitted
> 
> Generally you do not want to do this, you can create loops and all
> sorts of nasty things with hardlinks to directories. The man page for
> link even explicitly lists an error for this:
> 
>        EPERM  oldpath is a directory.
> 
> You also have to ask yourself, if there are two hardlinks to a
> directory, which directory is its parent.
> 
> You can create soft links to directories though.
> 
> Steve
> 
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Scanning Service. For further information visit
> http://www.messagelabs.com/stats.asp
> 
> [[HTML alternate version deleted]]

-- 
Jean Francois Martinez

Project Independence http://independence.seul.org
Because Linux should be for everyone


<Prev in Thread] Current Thread [Next in Thread>