WIPE(1)
๐ WIPE(1) โ General Commands Manual ๐
okay bestie, welcome to wipe, from the General Commands Manual, and no cap this one's a baddie ๐งโจ
๐ธ NAME ๐ธ
wipe โ secure file deletion utility ๐๏ธ๐ฅ
โจ SYNOPSIS โจ
wipe
[-ucwsiIhfFdDnNvVzZrRtTkKaAeE] [-B(count)] [-S(size)] [-C(size)]
[-o[size] -O] [-l[0-2]] [-x[1-32] -X] [-p(1-32)] [-b(0-255)] [files]
๐ DEFAULT ๐
like, if you just run it with zero thoughts in your head, this is what you get:
wipe -ZdNTVEAkO -S512 -C4096 -l1 -x1 -p1
๐ DESCRIPTION ๐
Wipe is a secure file wiping utility. periodt. but bestie, there are some low level issues that you must take into consideration, iykyk. one of these is that there has to be some sort of write barrier between passes. Wipe uses fdatasync(2) (or fsync(2)) as a write barrier, or if fsync(2) isn't available, the file is opened with the O_DSYNC or O_SYNC flag. for wipe to be effective, each pass must be completely written โ like, fully, no half-sending the message ๐. to ensure this, the drive must support some form of a write barrier, write cache flush, or write cache disabling. SCSI supports ordered command tags, has a force media access bit for commands, and write cache can be disabled on mode page 8. IDE/ATA drives support write cache flushes and write cache disabling. Unfortunetly (๐ญ yes that's the vibe), not all drives actually disable write cache when asked to. those drives are broken. write caching should always be disabled, unless your system is battery backed and always powers down cleanly.
under linux, the mount option "mand" must be used (see linux/Documentation/mandatory.txt) for mandatory file locks to be enabled. Wipe should make it extremely difficult for all but the most determined person(s) to recover the original plaintext data. utilities such as PGP and the GNU Privacy Guard provide strong encryption, but encryption is useless if the original plaintext can be recovered โ it's giving locked door with the key taped to it ๐. when using PGP and GPG, temporary files that are disk-backed should be stored on an encrypted file system. that way, the plaintext never hits the platters. Wipe is designed for situations where an encrypted file system isn't practical.
Wipe uses /dev/urandom, or if unavailable, /dev/random, as a source for entropy. the Mersenne Twister PRNG is used for speed ๐๏ธโญ the MT site is at:
http://www.math.keio.ac.jp/~matumoto/emt.html
for more information on the secure deletion of magnetic media and solid state storage devices (such as DRAM) see the USENIX article by Peter Gutmann at:
http://www.cs.auckland.ac.nz/~pgut001/secure_del.html
๐ฅ OPTIONS ๐ฅ
-hโ display help screen. shows options and what they do. the literal least you can do ๐ซถ-uโ usage โ shows options.-cโ shows copywrite information.-wโ shows warranty.-iโ interactive โ prompt whether to remove each file explicitly, and checks file permissions.-Iโ disables interaction. antisocial mode, lowkey iconic.-fโ forces file wiping and suppresses permission warnings. she does not care ๐-ror-Rโ recursion โ traverse subdirectories.-sโ silent โ disable percent reporting and some warnings.-Vโ verbose โ shows percentage if file size is above a certain limit (seewipe -h).-vโ force verbose โ always show percentage. main character energy ๐๐-eand-Eโ on (-e) makes the percentage (only if shown) more accurate by callingfdatasync()before each update; off (-E) will be slightly less accurate, but wipe will only callfdatasync()between passes.-dand-Dโ delete (-d) or keep (-D) after wiping.-nand-Nโ delete (-n) or skip (-N) fifos, sockets, sym links, and char devices.-kand-Kโ lock (-k) or don't lock (-K) files during wiping.-zโ zero-out file โ performs a single pass of zeros.-Zโ perform normal passes โ overrides-z.-tand-Tโ enable (-t) or disable (-T) static passes.-aand-Aโ write until out of space (-a) or don't (-A). goblin mode vs. restraint ๐-oand-Oโ write [size] to stdout (-o) or use files (-O).
since wipe does not have specific support for char devs, like it does for block devs, this is the preferred method of wiping them, such as tape drives; eg, wipe -za -o | buffer > /dev/nst0 It can also be used for block devs; eg wipe -To | dd count=size of=blkdev
you can also use this to create files containing pseudo-random output from the MT PRNG; eg, wipe -To10240 -x1 > prand
for static passes, you must specify a stdout length โ ๏ธ
-Bโ override block device sector count.-Sโ override block device sector size.-Cโ chunk size โ the maximum file buffer size.-lโ sets generic security level:- level
0, the PRNG is only seeded once - level
1, the PRNG is seeded once per file - level
2, the PRNG is seeded once per random pass
- level
-xโ enables random passes and optionally, how many random passes to perform โ note that this option now sets the number of random passes per wipe loop โ in other words, the total number of random passes will be random passes * wipe loops (-p). math girlie behaviour ๐งฎโจ-Xโ disable random passes.-pโ loop passes โ perform wipe sequence x times, including random passes.-bโ custom byte โ overwrite once with a specific byte.
๐ฆ FILES ๐ฆ
/dev/urandomโ Wipe uses this character device for a source of entropy./dev/randomโ Wipe falls back to using this if/dev/urandomis not available.
๐ญ DIAGNOSTICS ๐ญ
if an error occurs, the exit code will be the errno value. an exit code of 2 indicates bad usage โ aka you typed something unhinged.
๐ BUGS ๐
- Wipe does not work on log structured file systems, or any other type of file system or block device that reallocates sectors on write. not me trying to wipe a file system that just reallocates everything back ๐
- some programs are vulnerable to symlink races. to avoid this problem with wipe, only wipe files in directories that are not writable by untrusted users. fr fr, keep your permissions tight.
๐ NOTES ๐
๐ง Tapes and other sequential access devices
choose an appropriate buffer size to match the logic or physical block size of the device. when using the pattern passes, you should disable compression on the drive, and it's generally best to so for other passes as well.
for VXA drives, I used mt-st under linux to set the block size to 0 (variable) and turn off compression, and I run wipe with a 64k block size, to match the on-tape format's native block size.
Example:
mt-st setblk 0
mt-st compression 0
wipe -C64 /dev/st0
๐ ALTERNATIVES ๐
other file wiping utilities, in case you want options (we love options):
- another "wipe" by Berke Durak
durakb@crit2.univ-montp2.fr - Colin Plumb's
colin@nyx.netsterilize. - Todd Burgess's
tburgess@eddie.cis.uoguelph.casrm is available on sunsite/metalab in
ftp://metalab.unc.edu/pub/Linux/system/filesystems/
โญ SEE ALSO โญ
/usr/doc/wipe/READMEโ go read it bestie ๐๐
๐ซถ AUTHORS ๐ซถ
Wipe Copyright (C) 1998-2009 Thomas M. Vier, Jr. nester@users.sf.net
Mersenne Twister PRNG module Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura
and that's the whole page babes ๐ this was the WIPE(1) page from the General Commands Manual โ stay safe, stay synced, and go delete some files responsibly โจ๐๐ฆ
๐ฆ where this page comes from
- alpine 3.22: wipe-doc 2.3.1-r5 ยท GPL-2.0-only
- alpine 3.23: wipe-doc 2.3.1-r5 ยท GPL-2.0-only
- alpine 3.24: wipe-doc 2.3.1-r5 ยท GPL-2.0-only
- arch rolling: wipe 2.3.1-6 ยท GPL-2.0-or-later
- nixos 26.05: wipe 2.3.1
- nixpkgs unstable: wipe 2.3.1
- opensuse-leap 16.0: wipe 2.3.1-bp160.1.12 ยท GPL-2.0-or-later
- opensuse-leap 16.0: wipe 2.3.1-bp160.1.12 ยท GPL-2.0-or-later
- opensuse-leap 16.0: wipe 2.3.1-bp160.1.12 ยท GPL-2.0-or-later
- opensuse-leap 16.0: wipe 2.3.1-bp160.1.12 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms