creates a 1GB file and meassures the time it takes to md5sum that file.

so you can calculate how long it is going to take to md5sum 1TB…

md5sum md5



convertsecs() {
 printf "%02d:%02d:%02dn" $h $m $s

echo "===================== md5sum benchmark";

echo "======== generate 1GB test file";

dd if=/dev/zero of=md5sumTestFile count=1048576 bs=1024;
du -h md5sumTestFile;

echo "======== start:";date +"%T";
timestampStart=$(date +%s);

md5sum md5sumTestFile;

echo "======== start:";date +"%T";
timestampStop=$(date +%s);

timestampDiff=$(expr $timestampStop - $timestampStart);

echo "======== finished in:"; echo $timestampDiff; echo " Seconds";

echo "so it would take ";
timestampDiff=$(expr $timestampDiff * 1024);

echo $(convertsecs $timestampDiff);

echo " to md5sum for 1TB";

# removing test file
rm -rf md5sumTestFile;