LoginSignup
4
3

More than 5 years have passed since last update.

rsyncとかscpとか適当なメモ

Posted at

ディレクトリ単位で同期
rsync -avr --delete /hoge/* どっか:/hoge/

ファイル単位で
rsync -avr /hoge/hoge.file どっか:/hoge/hoge.file

同期対象外を指定したい時
/hoge/exclude_pattern
上記みたいなファイルん中に言葉を指定

#対象外にしたい言葉を一個ずつ入れてく
hage
dage

rsync -avr --delete --exclude-from /hoge/exclude_pattern /hoge/* どっか:/hoge/

scpだと(なんでこれ-rついてたんだろか
scp -r /hoge/hoge.file どっか:/hoge/hoge.file

rsyncちゃんとファイル更新されてるのに、たまに同期されてない時あって、そのときはひたすらscpで頑張ってた。

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