Accessing a cygwin symlink from windows

后端 未结 4 758
野的像风
野的像风 2020-12-16 00:14

I am quite new to cygwin. I created a symlink as follows

$ ln -s /var/www /cygdrive/d/foo

and when

4条回答
  •  太阳男子
    2020-12-16 00:59

    One alternative way to call mklink (/d creates directory link) without function:

    link_name="/cygdrive/c/TestLink"
    target_dir="/cygwin/c/Windows"
    cmd /c mklink /d "`cygpath -w \"$link_name\"`" "`cygpath -w \"$target_dir\"`"
    

    This example uses backticks (`command`) for command substitution.

提交回复
热议问题