ln -s file folder becomes (txt) / linux link error

problem: 

  This is usually not noticed this problem, when I use the ln -s xxx yyy xxx to yyy moving path, the folder becomes a txt file,

solve:

  Looking for a long, found the answer on stackoverflow, very simple, I used the `folder in the source file.`, Ln relative path is not allowed. So change the absolute path

Sentence plus $ PWD / can be. 

  Interestingly, in the target folder ./ use relative paths are possible. That second argument can be a relative path, which explains I usually do not encounter

This problem, because I used to like to execute commands on the target file directory

 

reference:

stackoverflow:

https://stackoverflow.com/questions/17894097/why-is-my-symbolic-link-creating-a-file-and-not-a-folder/51089723#51089723

Guess you like

Origin www.cnblogs.com/captainhook/p/12075641.html