Previous: , Up: Usage   [Contents]


4.3 Command line syntax and options

Basic syntax is:

wipefreespace [options] /dev/XY [...]

The /dev/XY part stands for a device with a supported file system. Examples: /dev/hda1, /dev/fd0. More than one device can be given on the command line, but they will be wiped sequentially, NOT in multiple threads. WipeFreeSpace is not multithreaded and probably won’t be, because the libraries used can be not thread-safe and the program can’t tell if a library will be used until it’s used.

But, you can run multiple WipeFreeSpace processes (just not wiping the same filesystem) in multiple terminals (or under screen/nohup) as a substitute for multi-threading.

Each given filesystem is wiped ONLY ONCE, no matter how many times it appears on the command line.

WipeFreeSpace also works for file systems created inside regular files on any host file system.

NOTE: It is best to use this program on un-mounted file systems, which makes sure the journal is committed.

NOTE: If a block is damaged, it is only wiped until the first error. There is no guarantee that it will be fully wiped.

Options:

--all-zeros

Use only zeros for wiping.

--background

Continue work in the background, if possible. This disables verbose mode.

-b superblock_offset
--superblock superblock_offset

Superblock offset on the given filesystems (usually detected automatically).

-B block_size
--blocksize block_size

Block size on the given filesystems (usually detected automatically).

-f
--force

Forces the program to do its job even when the file system has errors.

-h
--help

Print help and exit.

--last-zero

Perform additional wiping with zeros.

-l
--license
--licence

Print license information and exit.

--method <name>

Use the given method for wiping (read below).

-n NNN
--iterations NNN

Number of passes (must be greater than 0). This is also the number of patterns (including random) used to wipe the free space.

--nopart

Do NOT wipe free space in partially used blocks.

--nounrm

Do NOT wipe undelete information.

--nowfs

Do NOT wipe free space on file system.

--no-wipe-zero-blocks

Do NOT wipe all-zero blocks on file system (useful for virtual/sparse devices, where empty areas are read as all-zeros and do not take physical space unless actually written to).

--use-dedicated

Use the program dedicated for the given filesystem type if supported. Fallback to WipeFreeSpace if unsupported (currently, only ntfswipe is supported)

--use-ioctl

Disable device caching during work (can be DANGEROUS). This requires the fcntl.h header file and the ‘ioctl()’ function to be present. NOTE: this may not work for sub-partitions on drives. To disable the cache, run the hdparm utility with the correct options to disable the cache before running wipefreespace and enable the cache afterwards.

-v
--verbose

Enables verbose output. The program will tell what it’s doing. Use twice for more. This also enables progress bars, but be warned: these may not always be accurate or increase at a constant rate.

-V
--version

Print version number and exit.

The following method names (case-insensitive) are available:

NOTE: wiping with just one pattern at a time (-n 1) will NOT perform wiping with all patterns of the given method one by one, it will always use the first pattern. However, it will be MUCH faster than any "full" method. If you need just random wiping, run

wipefreespace -n 1 /dev/XY

a few times in a row.

NOTE: All three options --nopart, --nounrm, --nowfs must NOT be given at once. This would mean that no work must be done and the program will exit with "Bad/missing command line syntax" error code.

NOTE: Any option affects all filesystems given on the command line, not just the ones following it.

To perform a command after wiping (like sending e-mail), simply run a program after WipeFreeSpace is finished, for example:

wipefreespace [options] /dev/XY; mail [options]

or in a script:

	#!/bin/bash
	wipefreespace [options] /dev/XY
	mail [options]

To run WipeFreeSpace with a higher or lower priority, simply use the renice utility, for example:

renice +1 $(pidof wipefreespace)


Previous: , Up: Usage   [Contents]