Preview rsync transfer statistics
Build a paste-ready command, then review its compatibility and effects before running it.
rsync -an --stats <path>/ /tmp/backup/Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementsrsyncrsync must be installed and available on PATH.
Version supportrsync Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsNumber of files: 42 (reg: 38, dir: 4)Representative 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 -an --stats {{path}}/ /tmp/backup/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-anOptionConfigures rsync with the -an option.
03--statsOptionConfigures rsync with the --stats option.
04<path>/ParameterA value supplied in the Fill parameters section.
05/tmp/backup/ArgumentPasses /tmp/backup/ to rsync.
Example input
rsync -an --stats /var/log/ /tmp/backup/
Example output
Number of files: 42 (reg: 38, dir: 4)
Number of created files: 2 (reg: 2)
Total file size: 18.42M bytes
Total transferred file size: 1.24M bytes
Illustrative output — exact values vary by system and data.
Official sources