CommandLinux / Mac
Hollow Sync
Sync Directories with Dry Run Preview
Synchronizes two directories using rsync with a preview mode that shows what would change without making modifications. Critical for verifying backup and deployment operations.
rsync -avhn --delete source/ destination/Usage Notes
- •
-aarchive mode (preserves permissions, timestamps, symlinks) - •
-vverbose output - •
-hhuman-readable sizes - •
-ndry run (no changes made) - •
--deleteremoves files in destination not present in source - •Remove
-nto execute the actual sync - •Trailing slash on source matters:
source/syncs contents,sourcesyncs the folder itself
Warnings
The --delete flag permanently removes files from destination. Always run with -n first to preview changes.
Related Scroll Ideas
- • Rsync over SSH to remote server
- • Exclude patterns during sync
- • Sync with bandwidth limiting