Created
February 25, 2014 13:00
-
-
Save takeoverjp/9208302 to your computer and use it in GitHub Desktop.
シンボリックリンクの向き先変更(ln -nfs TARGET LINK_NAME) ref: http://qiita.com/takeoverjp/items/bb1576e90a8a495db4b3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ls -l | |
TARGET1/ | |
TARGET2/ | |
$ ln -fs TARGET1 LINK_NAME # 1回目は大丈夫 | |
$ ls -l | |
LINK_NAME -> TARGET1/ | |
TARGET1/ | |
TARGET2/ | |
$ ln -fs TARGET2 LINK_NAME # 2回目は... | |
$ ls -l | |
LINK_NAME -> TARGET1/ # 向き先が変わっていない | |
TARGET1/ | |
TARGET2/ | |
$ ls -l LINK_NAME/ | |
TARGET2 -> TARGET2 # なんと循環参照してしまっている |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(続き) | |
$ ln -nfs TARGET2 LINK_NAME | |
$ ls -l | |
LINK_NAME -> TARGET2/ # ちゃんと向き先が変わっている | |
TARGET1/ | |
TARGET2/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment