LoginSignup
3
2

More than 5 years have passed since last update.

cpコマンドを簡略化して表記する

Posted at

cpをする際は、以下のようにソースとターゲットを指定するのが基本です。

cp a.conf a.conf.bak

この例のように、ファイル名の末尾に特定の文字を付けてコピーしたい場合には、
以下のように簡単に書くことが出来ます。

cp a.conf{,.bak}

mvでも同様です。

3
2
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
3
2