Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hard Links

5 views
Skip to first unread message

Nordlöw

unread,
Nov 10, 2009, 4:50:36 PM11/10/09
to
What are hard links used for?

/Nordlöw

Jeremy J Starcher

unread,
Nov 11, 2009, 1:53:31 PM11/11/09
to
On Tue, 10 Nov 2009 13:50:36 -0800, Nordlöw wrote:

> What are hard links used for?
>
> /Nordlöw

Hard links tend not to be used as much anymore [by end user software] now
that soft links are commonly available.

They are still used in directory structures. The directory entry ".." is
a hard link to the parent directory.

Hard links also have the additional plus that they don't use an extra
inode entry. With a hard link, the two names refer to exactly the same
file, like two doors to the same room.


(Often, single executable will do different things based upon the name
that it is invoked with .. like if you load 'vim' with the name 'vi' then
it will act more like 'vi'. z)

Soft links offer /most/ of the advantages of hard links, and offer the
extra advantage that they can span file systems, refer to directories and
one can easily figure out what it refers to.

In other words:

"hard links are a primitive weapon from a more barbaric age of Unix"
*grin*

Don John Bluean

unread,
Nov 21, 2009, 2:41:30 PM11/21/09
to
On Wed, 11 Nov 2009 18:53:31 +0000, Jeremy J Starcher wrote:

> On Tue, 10 Nov 2009 13:50:36 -0800, Nordlöw wrote:
>
>> What are hard links used for?
>>
>> /Nordlöw
>
> Hard links tend not to be used as much anymore [by end user software]
> now that soft links are commonly available.
>
> They are still used in directory structures. The directory entry ".."
> is a hard link to the parent directory.
>
> Hard links also have the additional plus that they don't use an extra
> inode entry. With a hard link, the two names refer to exactly the same
> file, like two doors to the same room.
>
>
> (Often, single executable will do different things based upon the name
> that it is invoked with .. like if you load 'vim' with the name 'vi'
> then it will act more like 'vi'. z)
>

Mostly agreeing with you until that point where I have to slightly
moderate the first part of next sentence ;-)

> Soft links offer /most/ of the advantages of hard links, and offer the
> extra advantage that they can span file systems,

:.s/advantage/inconvenient/

> refer to directories
> and one can easily figure out what it refers to.

agreed, that's a big plus, too many times I've got my hard links
botched by fresher admins who never figured the fileB was a
hard link to fileA, results sometimes were cron jobs died because
someone just deleted the 'fileB' :D)

>
> In other words:
>
> "hard links are a primitive weapon from a more barbaric age of Unix"
> *grin*

or, "hard links are weapons while soft links under the pink and blue
fluffy disguise still are and the disguise has traps of its own"?

> *grin*
grunt ;-)

Andreas Marschke

unread,
Jan 2, 2010, 10:40:14 AM1/2/10
to
Its also based on the blind fate of this HARDLINK is teh same over all
the derivatives of the UNIX operating system.
0 new messages