Does cygwin understand NTFS junction points?

烂漫一生 提交于 2019-12-11 03:45:45

问题


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:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4043603/does-cygwin-understand-ntfs-junction-points

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!