LoginSignup
1
1

More than 5 years have passed since last update.

ディレクトリを丸ごとコピーするLinuxコマンド

Last updated at Posted at 2018-12-09

サブディレクトリを含めてコピーしたい場合は、cpコマンドの-Rオプションを使う。

cpコマンドでディレクトリを丸ごと別のディレクトリにコピーする書式

cp -R 【コピー元のディレクトリ】 【コピー先のディレクトリ】

ex1)一階層上にディレクトリを作成
cp -R hoge ../

ex2)同階層に別名のディレクトリを作成
cp -R hoge hoge.old

1
1
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
1
1