Does cygwin understand NTFS junction points?
Asked Answered
R

2

2

Does cygwin (1.7.x) understand Windows NTFS junction points (as created by mklink in Win7/2008 or sysinternals' junction.exe)?

How do they differ from a symbolic link as created by "ln -s "?

Rickie answered 28/10, 2010 at 13:59 Comment(0)
H
5

Yes, Cygwin 1.7 does understand NTFS junction points and also NTFS symbolic links (as introduced with Vista). They appear as symbolic links to Cygwin programs, so that for example deleting such a link will only delete the link rather than the file being pointed too.

The reason that Cygwin doesn't use NTFS symbolic links when creating Cygwin symlinks is that only elevated administrators are allowed to create them (unless a registry setting is changed) and that they don't have all the required POSIX semantics.

Hyrax answered 29/10, 2010 at 15:36 Comment(0)
W
1

Cygwin's symbolic links are nothing but a file saying where the link goes to. Here's what you find when you look at the contents of one from a Windows cmd prompt:

C:\>type c:\cygwin\bin\emacs
!<symlink> ■/ e t c / a l t e r n a t i v e s / e m a c s
C:\>

AFAIK, Window's NTFS junction points are something completely different. I would expect that since they are done in the file-system layer, cygwin would see nothing different about them from any other file/directory.

Having said that, I will also say I haven't played with NTFS junction points, so YMMV.

Worn answered 28/10, 2010 at 20:32 Comment(1)
You're right regarding Cygwin-created symlinks, but wrong regarding junctions points.Hyrax

© 2022 - 2024 — McMap. All rights reserved.