Subject: Re: bug#17149: shred - tape data

From: Pádraig Brady <[email-masked]>
Date: Tue, 01 Apr 2014 13:38:27 +0100

On 04/01/2014 01:18 PM, Rupert Russell wrote:
> Pádraig,
> 
> This seems to be getting my task done.
> 
> for i in $(seq 1 $NUMTAPES) ; do
> 		mtx -f $LOADER load $i
> 	for j in $(seq 1 $NUMWIPES); do 
> 			shred -v -n 1 $TAPE
>  			mt -f $TAPE rewind
> 	done         
>            		shred -v -z -n 0 $TAPE
> 		mt -f $TAPE rewind
> 		mtx -f $LOADER unload $i
> done
> 
> By the way, is there a difference between what these two write to the media?
> mt -f $TAPE erase   and
> shred -z -n 0 $TAPE

It depends I suppose.
`mt erase` might trigger a command to the hardware
to activate a degausser or something, rather than writing zeros,
though from a very quick google it defaults to writing zeros.

BTW I find this a handy way to see what shred is doing
rather than reading the docs:

  strace -e write shred -s 1K /dev/null

thanks,
Pádraig.