I want to wipe a partition quickly.I search the answer in website.
such as:
dd if=/dev/zero of=/dev/sda1 bs=16M count=96
shred -v -z -n 1 /dev/sda1
But:
All the commandline,will overwrite with value zero though there is zero. I think in the partition somewhere have value,but somewhere also have zero.
Want: Just use commandline but not GUN.Because ddrescue Need to compile and install
dd
or shred
or other command just overwrite zero to where that there's value is not zero in a partition in Linux.
Update:
My understand is in below
Now:
ddrescue -b 1572864 --generate-mode /dev/zero /dev/sda1 flash.map
// This will create a flash.map
ddrescue -b 1572864 --force --fill-mode=+ /dev/zero /dev/sda1 flash.map
//will to fill the patition by flash.map
//1572864byte =16M*96
It's right?What about my understand?
ddrescue -b 1572864 --generate-mode /dev/zero /dev/sda1 flash.map // This will create a flash.map
ddrescue -b 1572864--force --fill-mode=+ /dev/zero /dev/sda1 flash.map //will to fill the patition by flash.map
//1572864byte =16M*96 It's right?What about my understand? Thanks Zchme, Kamil Maciorowski!
– Zchme Apr 16 '19 at 16:511572864
certainly looks wrong. It should probably be either512
or4096
. – Kamil Maciorowski Apr 16 '19 at 16:59-b bytes --sector-size=bytes Sector (hardware block) size of input device in bytes
So my patition size is 16M*96 =1572864byte
I have no idea.And I want a not need to compile and install commandline.
Thanks Kamil Maciorowski again!
– Zchme Apr 16 '19 at 17:11