LoginSignup
0
0

More than 5 years have passed since last update.

【めも】ファイルが存在するときのシンボリックリンク作成

Posted at

ln -s .bashrc ~/.bashrc

$ ln -s .bashrc ~/.bashrc
ln: シンボリックリンク `~/.bashrc' の作成に失敗しました: ファイルが存在します

dotfilesをgithubで管理したいなと思い、
install.shを作成しようとしたところ、
ファイルが存在する時
(Ubuntuなどのインストール直後から.bashrc
がある時)
にどんな挙動になるのかと思い試してみたところ、
案の定エラーが出るんですね。

現状色んな環境で作業することがあるので、
条件分岐つけないとまずそうですね。
ちょっとずつ書いていこうと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0