Linux command
wipefs 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Display
sudo wipefs /dev/sda
Wipe
sudo wipefs -a /dev/sda
Example
sudo wipefs -a /dev/sda*
Dry run
sudo wipefs -a -n /dev/sda
Wipe
sudo wipefs -a -b /dev/sda
Force
sudo wipefs -a -f /dev/sda
Output
sudo wipefs -J /dev/sda
说明
wipefs erases filesystem, RAID, or partition-table signatures from a device. It removes the magic strings that identify the device type without destroying the actual data, allowing the device to be repurposed.
参数
- -a, --all
- Wipe all available signatures
- -n, --no-act
- Dry run - show what would be done
- -f, --force
- Force wiping even if device is in use
- -o, --offset _offset_
- Wipe signature at specific offset
- -b, --backup
- Create backup files of erased signatures
- -t, --types _list_
- Wipe only specified signature types
- -q, --quiet
- Suppress output messages after successful signature wipe
- -p, --parsable
- Print out in parsable format instead of printable
- -J, --json
- Use JSON output format
- -O, --output _list_
- Specify which output columns to print
FAQ
What is the wipefs command used for?
wipefs erases filesystem, RAID, or partition-table signatures from a device. It removes the magic strings that identify the device type without destroying the actual data, allowing the device to be repurposed.
How do I run a basic wipefs example?
Run `sudo wipefs /dev/sda` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --all do in wipefs?
Wipe all available signatures