Subject: how to distinguish between a original file and a hard link
From: spike1@freenet.co.uk
Date: 12/12/2007 12:31:19 AM
bzaman <bzaman.laskar@gmail.com> did eloquently scribble:
> Greetings,
> I have created a hard between two files on the same file system
> with the command
> ln mysqlaccess.log mysqlaccess
> But is there is any to distinguish which is the original file
> and which one is the link.
There is no way to distinguish between them...
Mainly because there is no difference. They are the same file with just two
links to the same "inode"
--
-----------------------------------------------------------------------------
| spike1@freenet.co.uk | Windows95 (noun): 32 bit extensions and a |
| | graphical shell for a 16 bit patch to an 8 bit |
|Andrew Halliwell BSc(hons)| operating system originally coded for a 4 bit |
| in |microprocessor, written by a 2 bit company, that|
| Computer Science | can't stand 1 bit of competition. |
-----------------------------------------------------------------------------
Subject: how to distinguish between a original file and a hard link
From: Unruh
Date: 12/12/2007 7:00:09 AM
spike1@freenet.co.uk writes:
>bzaman <bzaman.laskar@gmail.com> did eloquently scribble:
>> Greetings,
>> I have created a hard between two files on the same file system
>> with the command
>> ln mysqlaccess.log mysqlaccess
>> But is there is any to distinguish which is the original file
>> and which one is the link.
>There is no way to distinguish between them...
>Mainly because there is no difference. They are the same file with just two
>links to the same "inode"
Agreed. If I call you Bob and Joe, is there some way to distinguish between
Bob and Joe? One is not a "link". Both are just names for the same file.
If you want a link, use a soft link == ln -s
If you mean, which name was assigned first, no, there is no record kept of
that information, since it is irrelevant.
|