views:

23

answers:

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 "?

+1  A: 

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.

jwernerny
You're right regarding Cygwin-created symlinks, but wrong regarding junctions points.
ak2
+1  A: 

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.

ak2