LoginSignup
0
0

More than 5 years have passed since last update.

シェルのaliasを無視したい

Last updated at Posted at 2016-08-03
$ \cp a b

このコマンドの意味分かりますか?

実はcpコマンドとかは初めからaliasにされてることがあります。

$ alias cp 
alias cp='cp -i'

なので、cpコマンドの-iオプションが有効になり、毎回上書き確認をされます。

$ cp a b
cp: `b' を上書きしてもよろしいですか(yes/no)?

そこでコマンドの前にエスケープ文字を入れるとエイリアスを無視します。

$ \cp a b
$

ちなみに、commandコマンドでも同じです。

$ command cp a b
$
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