# Rsync
## Sync with Dry Run
```bash
rsync -avzhc --delete --dry-run --progress --itemize-changes /src/ /dst/
```
| Flag | Meaning |
|------|---------|
| `-a` | Archive mode (preserves permissions, timestamps, symlinks) |
| `-v` | Verbose |
| `-z` | Compress during transfer |
| `-h` | Human-readable sizes |
| `-c` | Checksum-based comparison (instead of time+size) |
| `--delete` | Remove files in destination not in source |
| `--dry-run` | Preview changes without applying |
| `--progress` | Show transfer progress |
| `--itemize-changes` | Show what changed per file |
**Important:** Trailing slash on source (`/src/`) means "contents of", without it means "the directory itself".
Remove `--dry-run` to execute for real.