dateien sicher löschen
Wolf Canis
mr_canis at yahoo.co.uk
Son Jan 13 17:12:24 GMT 2008
Frank wrote:
> Hallo Liste,
>
> Ich möchte meinen Laptop verkaufen und muß verständlicher weise
> alle meine Privaten Dateien UNWIDERRUFLICH sicher löschen ohne
> den Rechner platt zu machen. LTS 6.06 Ubuntu soll erhalten bleiben.
> Wer weiß da Rat.
>
Hallo Frank,
ich mache so etwas mit folgendem Script:
#!/bin/sh
DEVICE=/dev/sda3
TempFile=/tmp/$$.img
Blocksize=1048576
FreeBlocks=`df --block-size ${Blocksize} ${DEVICE} \
| tr -s " " | cut -d" " -f4 | grep [0-9]`
Blocks2init=${FreeBlocks}
#
# Main
#
echo "FreeBlocks = ${FreeBlocks}"
echo Free space to init ${Blocks2init}MB.
echo "To continue press ENTER or to cancel press CTRL-C."
read x
sync
echo "Start initialization..."
#dd if=/dev/zero \
dd if=/dev/urandom \
of=${TempFile} \
bs=1M \
ibs=1M \
obs=1M \
count=${Blocks2init} \
conv=sync
sync
rm ${TempFile}
echo "done."
# End of file.
Du musst natürlich die Variable DEVICE für jede Partition, in
der Du freien Speicherplatz initialisieren willst, anpassen.
Je nach Größe der Partitionen läuft das Script extrem lange,
dass ist aber, denke ich, völlig normal und ist akzeptabel in
Anbetracht des Zieles.
MfG
W. Canis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-de/attachments/20080113/18c3e919/attachment.pgp