public
Last active

シンボリックリンクの作成と削除 ref: http://qiita.com/mugyuu/items/2e99304bd92201261c60

  • Download Gist
file0.txt
1 2 3 4 5
hoge# ln -s /hoge/fuga/watshi ./watashi
もしくは
hoge# ln -s /hoge/fuga/watshi watashi
また、もし同じ名前でいいのなら、
hoge# ln -s /hoge/fuga/watshi
file1.txt
1
lrwxrwxrwx 1 hoge hoge 24 Feb 5 16:20 watashi -> /hoge/fuga/watshi
file2.txt
1 2
hoge# ln -s /hoge/fuga/watshi/ ./watashi/
ln: target `./watashi/' is not a directory: No such file or directory
file3.txt
1 2 3
hoge# ln -s /hoge/fuga/watshi/ ./watashi
hoge# ll
lrwxrwxrwx 1 hoge hoge 24 Feb 5 16:20 watashi -> /hoge/fuga/watshi//
file4.txt
1
hog# unlink ./watashi
file5.txt
1 2
hoge# rm ./watashi
rm: remove symbolic link `watashi'? y
file6.txt
1
hoge# rm watashi/

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.