This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ./badb.sh /dev/sdd 0.9 | |
# starts from 90th% block of the device using 4k blocks. | |
DEV=$(basename $1) | |
BLOCKS=$(cat /proc/partitions| grep $DEV| awk 'NR==1{ print $3 } ') | |
SIZE=1024 | |
NB=4 | |
BSIZE=$(( SIZE * NB )) |