Skip to main content
"skip" refers to the _input_, but we want to "seek" in the _output_
Source Link

Thanks for the solution on top!
Since I am not allowed to comment the answer with the script I have to add my tiny enhancement myself.
I just tuned it a little for more convenience so that one only has to define the device. fdisk will deliver the number of sectors:

#!/bin/bash # add device to mangle # example: # disk=/dev/sde disk= # get number of sectors sectors=$(fdisk $disk -l| head -1| awk '{print $7}') # run while (true); do randnum=${RANDOM}${RANDOM}${RANDOM} number=$((10#$randnum%$sectors)) echo -e $number >> progress.txt dd if=/dev/urandom of=$disk skip=$numberseek=$number count=1 done 

Thanks for the solution on top!
Since I am not allowed to comment the answer with the script I have to add my tiny enhancement myself.
I just tuned it a little for more convenience so that one only has to define the device. fdisk will deliver the number of sectors:

#!/bin/bash # add device to mangle # example: # disk=/dev/sde disk= # get number of sectors sectors=$(fdisk $disk -l| head -1| awk '{print $7}') # run while (true); do randnum=${RANDOM}${RANDOM} number=$((10#$randnum%$sectors)) echo -e $number >> progress.txt dd if=/dev/urandom of=$disk skip=$number count=1 done 

Thanks for the solution on top!
Since I am not allowed to comment the answer with the script I have to add my tiny enhancement myself.
I just tuned it a little for more convenience so that one only has to define the device. fdisk will deliver the number of sectors:

#!/bin/bash # add device to mangle # example: # disk=/dev/sde disk= # get number of sectors sectors=$(fdisk $disk -l| head -1| awk '{print $7}') # run while (true); do randnum=${RANDOM}${RANDOM}${RANDOM} number=$((10#$randnum%$sectors)) echo -e $number >> progress.txt dd if=/dev/urandom of=$disk seek=$number count=1 done 
Source Link

Thanks for the solution on top!
Since I am not allowed to comment the answer with the script I have to add my tiny enhancement myself.
I just tuned it a little for more convenience so that one only has to define the device. fdisk will deliver the number of sectors:

#!/bin/bash # add device to mangle # example: # disk=/dev/sde disk= # get number of sectors sectors=$(fdisk $disk -l| head -1| awk '{print $7}') # run while (true); do randnum=${RANDOM}${RANDOM} number=$((10#$randnum%$sectors)) echo -e $number >> progress.txt dd if=/dev/urandom of=$disk skip=$number count=1 done