4 ms·
The easiest way to verify file checksums is to use "rsync -c". Rsync will usually skip checksum verification of files if both the modification time and size mat
by keeperofdakeys 10y ago
The easiest way to verify file checksums is to use "rsync -c". Rsync will usually skip checksum verification of files if both the modification time and size match on the source and destination, the "-c" option tells it to always compute a checksum.
Sometimes I also use the following "one" liner, if it's local.
diff <(sort <(cd /path/to/source; \
find . -type f -print0 | \
xargs -0 sha1sum)) \
<(sort <(cd /path/to/destination; \
find . -type f -print0 | \
xargs -0 sha1sum))
Another nice rsync tip is that if you aren't using -a, you should at least use -t (preserve modification time). This will make a second rsync faster as it can skip files if the modification time and size match.