- src ディレクトリ内にある a.txt, b.txt を dst ディレクトリに同期させる
$ ls src
a.txt b.txt
$ ls
src
$ rsync -auv --delete src/ dst
sending incremental file list
created directory dst
./
a.txt
b.txt
sent 158 bytes received 53 bytes 422.00 bytes/sec
total size is 0 speedup is 0.00
$ ls
dst src
- 差分確認
$ diff src/ dst/
- src ディレクトリに c.txt を追加
$ touch src/c.txt
- 同期
$ rsync -auv --delete src/ dst
sending incremental file list
./
c.txt
sent 133 bytes received 34 bytes 334.00 bytes/sec
total size is 0 speedup is 0.00
- src/a.txt を削除
$ rm src/a.txt
- 同期実行
$ rsync -auv --delete src/ dst
sending incremental file list
./
deleting a.txt
sent 80 bytes received 15 bytes 190.00 bytes/sec
total size is 0 speedup is 0.00
0 件のコメント:
コメントを投稿