On 07/16/2010 12:38 PM, H.S. wrote:
On 16/07/10 01:01 PM, Ron Johnson wrote:
I don't think you can of= just the "empty" parts of your partition.
Attached is a Python script I use to "zero" out the free space of a
mounted partition.
Thanks for the script. You are basically writing 0xFF to the available
disk space. I used to have a C program which just did a similar thing,
writing 0x00 to a new file till the disk was full (or almost full). I
just deleted that file after I ran the program. This helped to compress
an image of the disk (using dd) quite nicely since all zeros give a
better compression ratio.
Having said that, why would dd not work the same way when I am writing
to a file using "of" on the partition in question?
Yeah, I guess you could write a bash script to:
1. determine the amount of free space.
2. Divide that by some efficient block size.
3. dd if=/dev/urandom of=${VFAT}/foo.bar \
obs=${BLKSIZ} count=${BLKCNT}
--
Seek truth from facts.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4c40a42e.6020...@cox.net