This is the mail archive of the
mailing list for the Cygwin project.
Re: link (corutils) 8.4-2: doesn't link
Eric Blake <firstname.lastname@example.org> 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
> 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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple