在 unix (linux/osx) 中创建的符号链接是不是仍然可以在 Windows 中工作?

Posted

技术标签:

【中文标题】在 unix (linux/osx) 中创建的符号链接是不是仍然可以在 Windows 中工作?【英文标题】:Will symbolic links created in unix (linux/osx) still working in windows?在 unix (linux/osx) 中创建的符号链接是否仍然可以在 Windows 中工作? 【发布时间】:2013-10-14 09:29:52 【问题描述】:

是否可以在 linux/osx 中创建具有相对路径的符号链接,将整个文件夹移动到 windows 系统并且仍然可以使用链接?

假设一个结构如下:

> ln -s ../c/e d

./a
  |
  |-/b
  |  |
  |  |-d -> ../c/e // symlink
  |  
  |-/c
     |
     |-e // original file

所以./a/b/d./a/c/e 的符号链接。如果我将整个 ./a 目录移到那里,这仍然可以在 Windows 上运行吗?

更新:

我发现了一些相关问题,但没有关于相对路径和 osx 案例的信息,或者它们有点过时(2007 年):

https://unix.stackexchange.com/questions/63172/does-windows-recognize-linuxs-symbolic-links http://www.linuxquestions.org/questions/linux-general-1/copy-symbolic-links-from-linux-to-windows-554000/ http://bytes.com/topic/unix/answers/620128-how-copy-symbolic-link-linux-windows

【问题讨论】:

osx:hfs,linux:ext4,windows:ntfs。 (只是普通的桌面FS) @static 你找到解决办法了吗? @MartinPrikryl:该链接是否也可以在 Windows 中用作符号链接,或者您的意思是,您可以将其复制到 Windows 并再次返回?它也适用于相对路径吗? @Goofy:不,我现在只是在 linux 上使用它。 @static 不,链接在 Windows 上不起作用,我误解了你的问题。删除我的评论。 【参考方案1】:

不,在 Windows 上,符号链接只会显示为一个文件,其中包含符号链接指向的文件的位置。

【讨论】:

以上是关于在 unix (linux/osx) 中创建的符号链接是不是仍然可以在 Windows 中工作?的主要内容,如果未能解决你的问题,请参考以下文章