4 # File ID: 8945d66e-5d49-11df-8e4e-90e6ba3022ac
5 # Overwrites fre space on a disk.
6 # Should be run as root to overwrite super-user reserved space.
8 [ -z $1 ] && { echo "Syntax: $0 directory" ; exit 1; }
11 [ -d $wdir ] ||
{ echo "$0: $wdir: Not a directory" >&2; exit 1; }
12 [ -w $wdir ] ||
{ echo "$0: $wdir: Need write access to this directory" >&2; exit 1; }
13 datafil
=$wdir/wdata.tmp
17 echo -n Creating
$datafil...
18 head -c 1234157 /dev
/urandom
>$datafil
20 echo -n Filling disk...
21 cat <$datafil >>$datafil 2>/dev
/null
30 echo -n Removing
$datafil...
33 echo ==== $count wipes
done ====