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?

コンテンツデータのコピペ方

Posted at

cpコマンド

shopt -s dotglob #隠しファイルもコピーできるようになる
cp -p /old/document/root/* /new/document/root/ #旧から新へコピペ
shopt -u dotglob #設定解除

rsyncコマンド

rsync -av --progress /old/document/root/ /new/document/root/

各オプションの意味

  • a :アーカイブモード(ディレクトリ構造・シンボリックリンク・パーミッション・所有者などを保持しつつコピー)

  • v :冗長モード(コピーされるファイル名などを表示)

  • --progress :進行状況(コピーの進み具合)を表示

パスの最後の / の意味

  • 中身だけをコピー(/old/document/root/ の中のファイルを対象)

/ がない場合

  • ディレクトリごとコピーされる(/old/document/root/ フォルダごと複製)
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?