This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: link (corutils) 8.4-2: doesn't link

Eric Blake <> writes:

> On 04/12/2010 08:15 AM, Paul Bibbings wrote:
>>    14:57:37 Paul Bibbings@JIJOU
>>    /cygdrive/d/Downloads/link_test $link zoo.exe zoo_link
>>    14:57:54 Paul Bibbings@JIJOU
>>    /cygdrive/d/Downloads/link_test $ls -l
>>    total 128
>>    -rwxr-xr-x+ 2 Paul Bibbings None 65024 Apr 12 14:57 zoo.exe
>>    -rwxr-xr-x+ 2 Paul Bibbings None 65024 Apr 12 14:57 zoo_link.exe
> Umm, that decisively shows that 'link' created a hard link, working as
> designed.  zoo.exe and zoo_link.exe both have a link count of 2,
> compared to the typical link count of 1, so they are one and the same inode.
>> Can I ask first of all: does link itself use ln and should I be testing
>> this?
> link(1) and ln(1) both call the link(2) syscall (well, ln does that if
> you didn't request symlinks).  Maybe your confusion stems from wanting a
> symlink instead of a hard link?  In which case, ln(1) is the only way to
> get symlinks; link(1) can _only_ create hard links.

Okay.  That makes sense.  It must be either that I recollect wrongly
that I had used link (instead of ln), or that I had used it in a context
where a hard link sufficed for whatever it was that I was trying to do
at the time.

Thank you for the clarification.


Paul Bibbings

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]