Skip to content

Instantly share code, notes, and snippets.

@haruaki64
Created November 30, 2016 07:09
Show Gist options
  • Save haruaki64/e816875b023a383e203154021e2e96b8 to your computer and use it in GitHub Desktop.
Save haruaki64/e816875b023a383e203154021e2e96b8 to your computer and use it in GitHub Desktop.
ディレクトリ間で差分があるファイル名を取得する
# option:
# -a -> -rlptgoDと同義
# -r ディレクトリを再帰的にコピー
# -l シンボリックリンクをdestで作り直す
# -p パーミッションを維持
# -t 修正時間情報を維持
# -g 所有グループを維持
# -o 所有者を維持
# -D デバイスファイルとスペシャルファイルを維持
# -v -> ファイル名を標準出力
# -n -> dry-run 実行した場合の結果のみを出力(実行はしない)
$ rsync -avn /path/to/source/ /path/to/dest/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment