11.06.08

Shreading Data

Posted in command tagged at 12:17 pm by bearisusanto

<!– @page { size: 21.59cm 27.94cm; margin: 2cm } P { margin-bottom: 0.21cm } –>

Data which has been deleted maybe could be recovered with recovery software, It could be dangerous if there is an important file that somebody couldn’t know the contents.

To reduce the risk, that someone could recovered our files, we can do deleting process permanently with using software utility which have permanent delete ability. In Linux platform, we have utility like SHRED and WIPE.

Here is the usage the two utility.

  1. Deleting data using SHRED

    I take a sample to delete USB Flashdisk (UFD) permanently.

    - Use command fdisk -l to know the UFD location

    root@hardy:/# fdisk -l

    Disk /dev/sdb: 1026 MB, 1026555392 bytes

    129 heads, 16 sectors/track, 971 cylinders

    Units = cylinders of 2064 * 512 = 1056768 bytes

    Disk identifier: 0×28eff17f

    Device Boot Start End Blocks Id System

    /dev/sdb1 * 1 972 1002487+ b W95 FAT32

    Partition 1 has different physical/logical endings:

    phys=(977, 128, 16) logical=(971, 52, 15)

    - From the information in the above, we knows that UFD is located at /dev/sdb1.

    Before we doing manual delete, do umount the UFD from system.

    First, see the mount UFD partition location use command df -h

    root@hardy:/# df -h

    /dev/sdb1 978M 347M 631M 36% /media/BENNY

    - Now, we can permanently delete our file using shred command

    root@hardy:/# shred –verbose -u /dev/sdb1

    shred: /dev/sdb1: pass 1/25 (random) … 126MiB/3.8GiB 3%

    - For default, command above will do overwrite iteration 25 times. If, this is too long we could use option -n

    root@hardy:/# shred –verbose -u -n 5 /dev/sdb1

    - Now, all data in UFD is permanently deleted. To using UFD again, we have to format it

  1. Deleting data using WIPE

    Except shred, we have wipe command which the have ability like shred.

    root@hardy:/# wipe -kq /dev/sdb1

    Okay to WIPE 1 special file ? (Yes/No) yes

    Wiping /dev/sdb1, pass 0 in quick mode [ 3884 / 1026555392]

To know the detail of wipe command, we could see from the manual

root@hardy:/#man wipe

Leave a Comment

You must be logged in to post a comment.