xfs
[Top] [All Lists]

Re: Hard Links

To: "Quang Nguyen (Ngo)" <quang.nguyen@xxxxxxxxxxxx>
Subject: Re: Hard Links
From: Steve Lord <lord@xxxxxxx>
Date: 11 Dec 2001 14:12:48 -0600
Cc: "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
In-reply-to: <ACD4093EB009D411BC8A009027D7699660A16E@mail.tapeware.com>
References: <ACD4093EB009D411BC8A009027D7699660A16E@mail.tapeware.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
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

> 
> --
> Quang
> 
> 
> _____________________________________________________________________
> 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]]
-- 

Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx


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