Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

wipefs

List or remove file system, RAID, LVM and partition table signatures from a device (fast, without wiping the data).

Niveau
Dagelijks Linux
Groep
Schijven en bestandssystemen
Root nodig
Ja
Pakket
util-linux

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Wat het doet

Old signatures confuse tools: mkfs refuses, LVM sees an old PV, the installer shows old RAID members. wipefs DEVICE lists the signatures; wipefs -a DEVICE removes them. Only the few bytes of the signatures are erased, so it is very fast — but the old data is not securely deleted.

Zo schrijf je het

wipefs [OPTION]... DEVICE...

Opties 14

Meest gebruikt

-a, --all
Remove all signatures.
-n, --no-act
Do everything except writing (test).
-b, --backup[=DIR]
Save each removed signature to a file first.
-o, --offset OFFSET
Remove only the signature at this offset.
-t, --types LIST
Only these types, like xfs,ext4 (no = exclude).
-f, --force
Also on mounted or busy devices (dangerous).
-q, --quiet
Less output.
-i, --noheadings
No header line.
-J, --json
JSON output.
-O, --output LIST
Choose columns.
-p, --parsable
Parsable output.
--lock[=MODE]
Lock the device.
-h, --help
Show help.
-V, --version
Show the version.

Voorbeelden 10

$ als gewone gebruiker# als root (of met sudo)

  1. 1List the signatures

    wipefs /dev/vdb
    DEVICE OFFSET        TYPE UUID LABEL
    vdb    0x200         gpt
    vdb    0x27ffffe00   gpt
    vdb    0x1fe         PMBR

    GPT has a backup at the end of the disk.

  2. 2Remove all signatures of a disk

    wipefs -a /dev/vdb

    The disk now looks empty for every tool.

  3. 3Test first

    wipefs -n -a /dev/vdb

    Shows what would be removed.

  4. 4Keep a backup of the signatures

    wipefs -a -b /dev/vdb1

    Files like ~/wipefs-vdb1-0x00000000.bak can restore it with dd.

  5. 5Remove only one type

    wipefs -a -t xfs /dev/vdb1

    Other signatures stay.

  6. 6Partitions first, then the disk

    wipefs -a /dev/vdb[0-9]*; wipefs -a /dev/vdb

    Clean reuse of an old disk.

  7. 7Before a new LVM PV

    wipefs -a /dev/vdc; pvcreate /dev/vdc

    pvcreate refuses disks with old signatures.

  8. 8JSON for automation

    wipefs -J /dev/vdb

    Check disks in scripts.

  9. 9After wipefs: really empty?

    lsblk -f /dev/vdb

    No FSTYPE, no partitions.

  10. 10Secure wipe needs more (security)

    blkdiscard /dev/nvme0n1

    wipefs leaves the data; use blkdiscard (SSD) or a full overwrite to destroy data.

Exitcodes

0 :: Done. 1 :: Error.

Volledige handleiding

Deze pagina legt het commando uit in eenvoudige woorden. De originele handleiding heeft elk detail.

In je terminal: man 8 wipefs