WipeFS
2.0
To clear a partition table, wipefs command can be used. Below article is a must read to understand all about partition, partition scheme and partition table.
Description wipefs can erase filesystem, raid or partition-table signatures (magic strings) from the specified device to make the signatures invisible for libblkid. Wipefs does not erase the filesystem itself nor any other data from the device. # wipefs -offset 0xff6 /dev/loop0 10 bytes 53 57 41 50 53 50 41 43 45 32 erased at offset 0xff6 (swap) The wipefs(8) command does not erase whole filesystem superblock or so. It removes magic strings only. Now the device is useful for blkid(8): # blkid -p /dev/loop0.
WipeFS erases unused space on hard disks, USB flash drives etc, to prevent the recovery of deleted files. Any data which still resides in that unused space, albeit marked 'free', can be properly and securely deleted by overwriting it. As you may know, simply deleting a file does not actually delete the content of the file. Instead, the space that file occupied on the disk is simply marked as being 'free', and may exist for a long time until another file is allocated that space (or part of it).Simply check the drive(s) you want to work on, the number of passes you want to perform (see Preferences) and click the 'Start' button.
When wiping begins, you are shown the following information:
• The name of the volume whose free space is currently being wiped.
• The value being used to overwrite the data (see Preferences).
• The segment number and total number of segments (segments are files the application writes to your volume, they are temporary and deleted after wiping has completed successfully).
• The current pass of the segment (see Preferences), if applicable.
• The overall progress.
The time it takes to wipe a volume depends on the size and type of the volume, the speed of your Mac (and amount of RAM), and how many passes you specify. Obviously, 8 passes will take eight times longer than 1 pass. Solid State Drives are quicker than conventional hard drives.
When wiping the free space on a volume you will be asked to select a folder in which this app can store temporary files. You must have read/write permissions for the chosen folder. We suggest you use the folder you are presented with.
The files created by this app will be cleaned-up after the free space has been successfully wiped or the process is aborted using the 'Stop' button.
In the event the temporary files created by the application are not deleted, select the drives above and then click the 'Clean up' button. You will then regain any lost disk space. If no temporary files are found, nothing will happen, if there are temporary files deleted you will be told how many were deleted.
see also : blkid - findfs
Synopsis
wipefs[-ahnpV] [-ooffset]device Realtimes for mac.
add an example, a script, a trick and tips
examples
no example yet ..
.. Feel free to add your own example above to help other Linux-lovers !
description
wipefscan erase filesystem or raid signatures (magic strings) fromthe specified device to make the filesystem invisiblefor libblkid. wipefs does not erase the filesystemitself nor any other data from the device. When used withoutoptions -a or -o, it lists all visiblefilesystems and the offsets of their signatures.
options
-a,--all
Erase all availablesignatures.
-h,--help
Print help and exit.
-n,--no-act
Wipefs Pmbr
Causes everything to be doneexcept for the write() call.
-o,--offsetoffset
Wipefs Debian
Specify the location (in bytes)of the signature which should be erased from the device. Theoffset number may include a '0x' prefix;then the number will be interpreted as a hex value. It ispossible to specify multiple -o options.
Theoffset argument may be followed by binary (2^N)suffixes KiB, MiB, GiB, TiB, PiB and EiB (the 'iB'is optional, e.g. 'K' has the same meaning as'KiB') or decimal (10^N) suffixes KB, MB, GB, PBand EB.
-p,--parsable
Print out in parsable insteadof printable format. Encode all potentially unsafecharacters of a string to the corresponding hex valueprefixed by ’x’.
-V,--version
Output version information andexit.
availability
The wipefs command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
see also
blkid findfs
author
Karel Zak<kzak[:at:]redhat[:dot:]com>.