Skip to main content
1 of 2
Stéphane Chazelas
  • 585k
  • 96
  • 1.1k
  • 1.7k

Simply do:

tr '\0' '\377' < /dev/zero > /dev/sdb

Using dd does not make sense here. It will abort with an error when the drive is full. You use dd to make sure reads and writes are made of a specific size. There's no reason to do it here. tr will do reads/writes of 4 or 8 kiB which should be OK

Stéphane Chazelas
  • 585k
  • 96
  • 1.1k
  • 1.7k