But better approach is to use shred -v /dev/sda adding whatever options you think you need to carefully erase all data. This command is part of coreutils and every single linux distribution have it out of the box.
Also, some disks have internal "secure erase" command, but I would not depend on it since nobody except manufacturer knows what that command really do.
/dev/urandom
/dev/urandom is a source of pseudorandom sequence, /dev/random is "true" random so /dev/random could be slower.
I think for erasing flash-based devices like SSD, USB-sticks or flash cards you could use /dev/urandom with same efficiency.
Could be just cat /dev/random > /dev/sda
But better approach is to use shred -v /dev/sda adding whatever options you think you need to carefully erase all data. This command is part of coreutils and every single linux distribution have it out of the box.
Also, some disks have internal "secure erase" command, but I would not depend on it since nobody except manufacturer knows what that command really do.