Securly Clear Free Hard Drive Space with Disk Scrub Utility

Sponsored Link
Scrub iteratively writes patterns on files or disk devices to make retrieving the data more difficult. Scrub operates in one of three modes:

The special file corresponding to an entire disk is scrubbed and all data on it is destroyed. This mode is selected if file is a character or block special file. This is the most effective method.

A regular file is scrubbed and only the data in the file (and optionally its name in the directory entry) is destroyed. The file size is rounded up to fill out the last file system block. This mode is selected if file is a regular file.

A file is created, expanded until the file system is full, then scrubbed as in item 2. This mode is selected with the -X option.
Scrub implements user-selectable pattern algorithms that are compliant with DoD 5520.22-M or NNSA NAP-14.x.

Install Scrub in Ubuntu

First you need to install Alien

sudo apt-get install alien

This will help us to convert .rpm files in to .deb packages

Now you need to download the Scrub latest version from here


You have scrub-1.8-1.i386.rpm file now.Convert this file in to .deb using the following command

sudo alien -k scrub-1.8-1.i386.rpm

Now you have the scrub-1.8-1.i386.deb package.You need to install this package using the following command

sudo dpkg -i scrub-1.8-1.i386.deb

This will complete the installation

Create a scratch directory for scrub.

sudo mkdir /scratch

Using Scrub

Scrub Syntax

scrub [-f] [-p nnsa|dod|bsi] [-X] [-D newname] [-s size] file


sudo scrub -X /scratch/junk

Delete junk file once scrub is finished.

sudo rm -f /scratch/junk

Check this forum post

Sponsored Link

You may also like...

1 Response

  1. Bob says:

    Or you could use shred:
    shred -n 5 -z -u /path/filename
    It writes random data to the file 5 times, then writes all zeros to the file and finally deletes it.
    Shred is part of the GNU coreutils and as such is available on practically all linux systems.

Leave a Reply

Your email address will not be published. Required fields are marked *