Cygwin vs. Native Symlinks

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Apr 1 13:31:00 GMT 2019


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190401/0ae57e9f/attachment.sig>


More information about the Cygwin mailing list