On Fri, 2009-01-16 at 22:15 +0100, Jim Meyering wrote:
> How about
> 
>   --random-source=FILE
> 
> where FILE contains a bunch of random data,
> like a chunk from the middle of a well-compressed tarball?
> Or even this:
> 
>   --random-source=/dev/zero

If I understand correctly, the --random-source must be as big as the
data to be shredded, which makes it only useful for smallish files (a
few hundred megas, at most). Certainly not effective for full disk
shreds.

But, if disabling the random pass is what is needed, then I guess
random-source=/dev/zero would do the trick nicely, as long as a smaller
number of passes is used.

Example runs:

Files involved:

hg...@xango2:/tmp $ ls -l usr*
-rw-r--r-- 1 hggdh hggdh 23921846 2009-01-16 16:07 usr.delta
-rw-r--r-- 1 hggdh hggdh 71766016 2009-01-16 16:18 usr.shred
hg...@xango2:/tmp $

Null random source (/dev/zero), 5 passes:

hg...@xango2:/tmp $ time shred -n5 --random-source=/dev/zero usr.shred

real    0m15.096s
user    0m0.028s
sys     0m2.380s
hg...@xango2:/tmp $
Null random source (/dev/zero), default number of passes (25):

hg...@xango2:/tmp $ time shred --random-source=/dev/zero usr.shred

real    1m15.607s
user    0m0.032s
sys     0m10.453s
hg...@xango2:/tmp $

Default random source (/dev/urandom), 5 passes:

hg...@xango2:/tmp $ time shred -n5 usr.shred

real    1m4.652s
user    0m0.040s
sys     0m46.315s
hg...@xango2:/tmp $ 

Default random source, default number of passes (25):

hg...@xango2:/tmp $ time shred usr.shred

real    2m0.369s
user    0m0.064s
sys     0m53.131s
hg...@xango2:/tmp

Regards,

..hggdh..

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to