rsync -av --checksum /home/user/data/ /mnt/backup/data/

Category: Backup & Restore

rsync -av --checksum /home/user/data/ /mnt/backup/data/

Compare files by checksum instead of size and date

The -c (--checksum) flag makes rsync compare file contents by checksum rather than the default size-and-mtime heuristic. Slower, but it catches files whose timestamps were touched without content changing. Useful when clock skew or timestamp tampering is a concern.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.