linux cpコマンドで指定フォルダーコピーしない方法

フォルダー構成

/folder1
/folder1/folder2
/folder1/folder3

上記のような構造で folder3 を除外したい場合。

rsync -a /folder1/ /back/to/path/folder1/ –exclude “/folder3/”

 

ポイント: –exclude で指定するディレクトリは /folder1/ を起点としたパス

コメントを残す