I'm currently writing 1s to a file using the following:
tr '\0' '\377' < /dev/zero > /dev/sdb
But this is a really slow method when I want to fill a 500GB disk. Is there a quicker way?
I'm currently writing 1s to a file using the following:
tr '\0' '\377' < /dev/zero > /dev/sdb
But this is a really slow method when I want to fill a 500GB disk. Is there a quicker way?
It may be faster to create a reasonably-sized file full of one bits, say 1MB, with something like tr '\0' '\377' </dev/zero | dd of=allones bs=1M
. Then you could write this repeatedly, e.g. while true; do cat allones; done >/dev/sdb
.
dd
have used in the case – Costas Sep 16 '15 at 09:43shred
. – Mikel Sep 16 '15 at 09:56dd if=/dev/zero of=/dev/sdb bs=1M
appreciably faster? (I know it's not the pattern you want, but that can be changed). – Mark Plotnick Sep 16 '15 at 14:39