Preview an rsync transfer to a remote host
Build a paste-ready command, then review its compatibility and effects before running it.
rsync -avhn --itemize-changes <source> <username>@<host>:<remote-destination>Complete required fields to copy the generated command.
Compatibility
Linux + macOSVerified for Linux, macOS using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsrsyncrsync must be installed and available on PATH.Network accessThe target must be reachable from the current environment.
Version supportrsync Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalssending incremental file listRepresentative successful output; values vary with the selected target and system state.
Known errorsrsync: command not foundrsync is missing or is not available on PATH.
Verifyrsync -avhn --itemize-changes {{source}} {{user}}@{{host}}:{{destination}}The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01rsyncCommandRuns the rsync stage of this one-liner.
02-avhnOptionCombines archive mode, verbose output, human-readable sizes, and a dry run.
03--itemize-changesOptionPrints a compact change code for every affected path.
04<source>ParameterA value supplied in the Fill parameters section.
05<username>@ParameterA value supplied in the Fill parameters section.
06<host>:ParameterA value supplied in the Fill parameters section.
07<remote-destination>ParameterA value supplied in the Fill parameters section.
Example input
rsync -avhn --itemize-changes site/ deploy@app01.example.com:/srv/www/site/
Example output
sending incremental file list
>f+++++++++ assets/app.8f31.js
>f.st...... index.html
.d..t...... assets/
sent 1,246 bytes received 88 bytes 2,668.00 bytes/sec
Illustrative output — exact values vary by system and data.
Official sources
Related commands