tail [path/]* |grep -v "==>" |md5sum
for both the source and target path usually does suffice and can be 10 to 100 times faster than md5sum [path/]*
. If the end of all files match, the file transfer was likely successful.Code: Select all
tail [source/]* |grep -v "==>" |md5sum
tail [target/]* |grep -v "==>" |md5sum
head
? Because it will not detect incompletely transferred files. (Rare exceptions can exist, but they are not worth considering.)tail
prints the file names by default. This would cause a mismatch due to the different path names, except if you change the working directory to the target folder before running tail
, so |grep -v "==>"
filters out the path names.Strangely, specifying tail with a low byte count, such as
tail -c 512 *
(to safeguard against the slight possibility of a file with very long lines), omits some files.