#!/bin/bash
cp /mnt/sdcard/appfs.cramfs /tmp/a.bin
umount /usr/fs
md5a=md5sum /tmp/a.bin | awk '{print $1 }'
asize=ls -l /tmp/a.bin | awk '{print $5 }'
cnt=1
echo “asize $asize”
while :
do
echo “------------------------”
echo "asize count=1
md5b=md5sum /tmp/b.bin | awk '{print $1 }'
if [ $md5a != $md5b ]
then
echo “md5 check fail”
echo $md5a
echo $md5b
exit 1
fi
rm /tmp/b.bin
sync
echo 3 > /proc/sys/vm/drop_caches
echo “md5 check pass”
echo “md5a $md5a”
echo "md5b (( $cnt + 1 ))
done
SD卡压力测试脚本.
来源:CSDN
作者:杨幂的咪
链接:https://blog.csdn.net/Hsu_smile/article/details/53004479