TIL

Today I Learned. 知ったこと、学んだことを書いていく

lnコマンド - Linux

ln -sを使うとシンボリックリンクが作成できる

$ ln -s シンボリックを作成したいフォルダの完全パス 作成するシンボリックのパス

/Users/username/Document/programs/Pythonシンボリックリンク/Users/Document/Python に作成する

$ ln -s /Users/username/Document/programs/Python /Users/Document/Python

これでOK

-fオプション

作成しようとしたシンボリックリンクがあっても強制的に作成する

リンクファイルと同じ名前のファイルがあっても強制的に上書きする

http://www.atmarkit.co.jp/ait/articles/1605/30/news022.html

$ ln -sf from.txt to.txt

シンボリックリンクについては以下の記事でざっくりと解説している。

tmg0525.hatenadiary.jp



参考文献