0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

相対パスの書き方でハマった

0
Last updated at Posted at 2020-05-27

chmod 755 /.bash_profileと書いてはまった

この書き方だとルートディレクトリにある.bash_profileを探している。
ホームディレクトリにいる状態で、ホームディレクトリ下のやつを探すので、(2020/5/28追記)
本当は~/.bash_profile.bash_profileと書く。

言い訳をすると、
viでbash_profileを編集しようとして、"e212 can't open file for writing"と怒られて読み取り権限しかないことに気づいて、chmodを使っていた。
sudo vi /.bash_profileでviが起動できてたから、/.bash_profileで正しいと思って、chmod 755 /.bash_profileと書いてしまっていて時間を無駄にしました。

パスはしっかり書かないといけないということを学びました。~/.bash_profile.bash_profileと書くようにします。

もうこんなハマり方は二度としたくないけど、自分のことだからまたやりそうなので備忘録として書きました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?