Cygwin vs. Native Symlinks

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cygwin vs. Native Symlinks

KARL BOTTS

Corinna said:

> ... Which lets symlinking with nativestrict fail. "winsymlinks:native"
> will work, albeit creating a Cygwin symlink then.


I use "winsymlinks:native".  Is there a tool or method with which I can
create a Cygwin symlink by force?  (I doubt I would actually want to:
I just want to know if I can, and to test behavior of a Cygwin symlink.)

Is there a tool which will tell me whether a given symlink is Cygwin or
native?
(The output of both readlink and symlinks looks the same, regardless.)

---
Karl Botts, [hidden email]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Cygwin vs. Native Symlinks

Corinna Vinschen-2
On Apr  1 07:39, KARL BOTTS wrote:
>
> Corinna said:
>
> > ... Which lets symlinking with nativestrict fail. "winsymlinks:native"
> > will work, albeit creating a Cygwin symlink then.
>
>
> I use "winsymlinks:native".  Is there a tool or method with which I can
> create a Cygwin symlink by force?

$ CYGWIN="" ln -s ...

> (I doubt I would actually want to:

Depends on if creating a symlink to a non-existant target is important
in your scenarios.  Just run with "winsymlinks:nativestrict" for a while
to find out.

> I just want to know if I can, and to test behavior of a Cygwin symlink.)
>
> Is there a tool which will tell me whether a given symlink is Cygwin or
> native?

Not a single tool, but a few simple checks:

- `ls -l' shows a symlink
- `attrib /l' shows the S bit being set (cygwin symlink) or not
- `cmd /c dir' will not show a cygwin symlink as symlink

> (The output of both readlink and symlinks looks the same, regardless.)

That's the idea of a transparent POSIX layer, the API hiding
the implementation details :)


Corinna

--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment