wipe-free − overwrite all free space in a filesystem with zeros
wipe-free [−b block_size] [−c count] [−m max_chunks] [−h(elp)]
wipe-free writes very large files containing all zeros to the current directory until the filesystem is filled (or the specified maximum number of files is written, and then deletes them all. This effectively zeros out all free space in the filesystem, making the filesystem much more compressible when backing up entire filesystem images. The dd, filesize, sync, and tempname utilities serve as the engines of the wipe-free utility.
Set the block size used by dd, in bytes. The default value is 4096.
Set the number of block per zero file. The default value is 262144, which is enough to yield a file of exactly 1 GiB.
Limit the number of files written by wipe-free. The default value is 4096, which is enough to fill a 4 TiB drive using the defaults given above. −h Print help and quit.
The reason that wipe-free writes zeros in chunks (instead of all at once), is that several filesystems tends to slow down markedly as they approach full. NTFS is one such culprit. With the periodic listing of the zero files, the user can detect such slowdown and manually halt wipe-free (via Ctrl-C) if desired.
Additionally, it should be noted that wipe-free is NOT a secure wiping utility. If you’re trying to ensure that data potentially stored in unused sectors cannot ever be read, then a formal secure erase program (such as shred or a utility from the secure_deletion package) should be used instead.
Alternatives to wipe-free include zerofree (which works on ext2/3/4 filesystems) and the three-step sequence of ntfsclone --save-image, dd if=/dev/zero, and ntfsclone --restore-image (which works on NTFS filesystems). These alternatives are more thorough than wipe-free, but are limited to specific filesystems.
dd(1), filesize(1), shred(1), sync(1), tempname(1), ntfsclone(1), zerofree(1)
Copyright (C) 2011-2021 by Brian Lindholm. This program is free software; you can use it, redistribute it, and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.