User Tools

Site Tools


cleandisk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cleandisk [2019-09-17 22:02:21]
mi
— (current)
Line 1: Line 1:
-Write nulls to free space of all partitions on /dev/sda 
- 
-<file bash cleandisk>​ 
-#!/bin/bash 
-## fill empty space with nulls to really delete everything 
- 
-sfdisk -d /dev/sda \ 
-| awk '/​^.dev.sd/​ {print $1}' \ 
-| while read d; do 
-    mkdir -p /mnt/x 
-    mount $d /mnt/x 
-    ls -l /mnt/x 
-    echo "​writing nulls to free space on $d ..." 
-    time cat /dev/zero > /​mnt/​x/​zeroes 
-    sync 
-    rm /​mnt/​x/​zeroes 
-    umount /mnt/x 
-  done 
-echo OK 
-</​file>​ 
- 
-{{tag>​public linux}} 
  
/docs/dokuwiki/data/attic/cleandisk.1568750541.txt.gz ยท Last modified: 2019-09-17 22:02:21 by mi