|
From: Mark M. <bwa...@ya...> - 2012-08-15 16:31:52
|
I did some searching and found some conflicting answers to this question. Most sites say that MinGW does not support symlinks, but then there was a patch floating around that did; Was it ever implemented? (Apparently not since it is still open?) Regardless, I have created links (by default hard) and evidently they work, although they appear to be exact duplicates of the original. I have tested them by altering the target, and then checking if the link is updated, and lo-and-behold, it is. Doesn't that mean that the files are linked? The issue is that I can't see links by using `ls -l`, and they certainly don't show up any different in windows explorer. How do I tell if a file is a link made by MSYS `ln`? Or if I'm completely misunderstanding (which is most likely the case) could someone please enlighten me? Normally ls -l shows the links with an arrow --> to the target, so that's what I'd expect. Thanks! Thanks, Mark Mikofski poquitopicante.blogspot.com breakingbytes.blogspot.com www.breaking-bytes.com |
|
From: Eli Z. <el...@gn...> - 2012-08-15 17:25:21
|
> Date: Wed, 15 Aug 2012 09:31:45 -0700 (PDT)
> From: Mark Mikofski <bwa...@ya...>
>
> I did some searching and found some conflicting answers to this question. Most sites say that MinGW does not support symlinks, but then there was a patch floating around that did; Was it ever implemented? (Apparently not since it is still open?)
Assuming you are asking about native Windows symlinks, introduced in
Vista:
. If you are asking whether MinGW has 'symlink' and 'readlink'
library functions, then no, not AFAIK.
. If you are asking whether one _can_ write these functions in
MinGW, then yes, one can. In fact, Emacs has such implementations
in its sources (and as result, Emacs supports symlinks on Vista
and later).
> Regardless, I have created links (by default hard) and evidently they work, although they appear to be exact duplicates of the original. I have tested them by altering the target, and then checking if the link is updated, and lo-and-behold, it is. Doesn't that mean that the files are linked?
Yes, probably.
> The issue is that I can't see links by using `ls -l`, and they certainly don't show up any different in windows explorer. How do I tell if a file is a link made by MSYS `ln`? Or if I'm completely misunderstanding (which is most likely the case) could someone please enlighten me?
Here, you seem to be asking about MSYS, not MinGW. That's another
issue, IIUC.
|
|
From: Mark M. <bwa...@ya...> - 2012-08-15 20:41:41
|
> From: Eli Zaretskii <el...@gn...> > Sent: Wednesday, August 15, 2012 10:24 AM > Subject: Re: [Mingw-users] Is it possible to show a symlink? > >> Date: Wed, 15 Aug 2012 09:31:45 -0700 (PDT) >> From: Mark Mikofski <bwa...@ya...> >> >> I did some searching and found some conflicting answers to this question. > Most sites say that MinGW does not support symlinks, but then there was a patch > floating around that did; Was it ever implemented? (Apparently not since it is > still open?) > > Assuming you are asking about native Windows symlinks, introduced in > Vista: > > . If you are asking whether MinGW has 'symlink' and 'readlink' > library functions, then no, not AFAIK. > > . If you are asking whether one _can_ write these functions in > MinGW, then yes, one can. In fact, Emacs has such implementations > in its sources (and as result, Emacs supports symlinks on Vista > and later). > >> Regardless, I have created links (by default hard) and evidently they work, > although they appear to be exact duplicates of the original. I have tested them > by altering the target, and then checking if the link is updated, and > lo-and-behold, it is. Doesn't that mean that the files are linked? > > Yes, probably. > >> The issue is that I can't see links by using `ls -l`, and they > certainly don't show up any different in windows explorer. How do I tell if > a file is a link made by MSYS `ln`? Or if I'm completely misunderstanding > (which is most likely the case) could someone please enlighten me? > > Here, you seem to be asking about MSYS, not MinGW. That's another > issue, IIUC. Yes my bad! (Ugh!) I meant NSYS (/bin/ln.exe), not MinGW, sorry! |
|
From: Earnie B. <ea...@us...> - 2012-08-15 19:25:29
|
On Wed, Aug 15, 2012 at 12:31 PM, Mark Mikofski wrote: > I did some searching and found some conflicting answers to this question. Most sites say that MinGW does not support symlinks, but then there was a patch floating around that did; Was it ever implemented? (Apparently not since it is still open?) > > Regardless, I have created links (by default hard) and evidently they work, although they appear to be exact duplicates of the original. I have tested them by altering the target, and then checking if the link is updated, and lo-and-behold, it is. Doesn't that mean that the files are linked? > > The issue is that I can't see links by using `ls -l`, and they certainly don't show up any different in windows explorer. How do I tell if a file is a link made by MSYS `ln`? Or if I'm completely misunderstanding (which is most likely the case) could someone please enlighten me? > > Normally ls -l shows the links with an arrow --> to the target, so that's what I'd expect. No one has taken the time to add the functionality to MSYS. You only option at the moment is to use cmd and ask it for a directory listing. The below will give it to you from the MSYS command window. On windows 7 you can also use cmd's mklink option, to learn about it use the help command displayed below. $ cmd //c dir //x $ cmd //c help mklink -- Earnie -- https://sites.google.com/site/earnieboyd |