Answers:
diskutil
从终端使用。以下命令
diskutil secureErase 0 /dev/diskX
一次擦除零将擦除由X标识的磁盘。您可以通过发出不带任何选项的命令来获得可用选项的列表:
$ diskutil secureErase
Usage: diskutil secureErase [freespace] level MountPoint|DiskIdentifier|DeviceNode
Securely erases either a whole disk or a volume's freespace.
Level should be one of the following:
0 - Single-pass zeros.
1 - Single-pass random numbers.
2 - US DoD 7-pass secure erase.
3 - Gutmann algorithm 35-pass secure erase.
4 - US DoE 3-pass secure erase.
Ownership of the affected disk is required.
Note: Level 2, 3, or 4 secure erases can take an extremely long time.
您无需对SSD进行安全擦除,因为标准擦除已足以保护您的数据。您需要多次通过甚至是DoD 7通过安全擦除的原因是,对于传统的硬盘驱动器(HDD),数据存储在磁性盘片上,即使擦拭时也会留下残留的磁性印记。这就是Disk Drill 软件之类的COTS(商用现货)实用程序能够重建驱动器的方式。SSD并非如此。没有东西被磁化。
实际上,建议您(不要误以为是高建议)不要进行安全擦除,因为由于增加的写操作会缩短SSD的预期寿命。
每个苹果:
注意:对于SSD驱动器,“磁盘工具”中不提供“安全擦除”和“擦除可用空间”。SSD驱动器不需要这些选项,因为标准擦除使其很难从SSD恢复数据。为了提高安全性,请考虑在开始使用SSD驱动器时打开FileVault加密。
现在,如果启用了TRIM(如果您的Mac出厂时已配备SSD),它将处理释放不再使用的数据块以使其可立即写入的任务。
艾伦(Allan)和克拉诺玛斯(Klanomath)都提供有关如何通过终端机执行此操作的准确建议。但是,如果要使用HDD(而不是SSD)进行此操作,则该选项在Disk Utility中仍然存在,尽管已更改。
按着这些次序:
希望这可以帮助。
不安全/安全擦除只能通过Terminal>访问diskutil zeroDisk|randomDisk|secureErase device
。
man diskutil
帮助:
zeroDisk [force] device
Erase a device, writing zeros to the media. The device can be a whole-disk or a partition. In either
case, in order to be useful again, zero'd whole-disks will need to be (re)partitioned, or zero'd parti-
tions will need to be (re)formatted with a file system, e.g. by using the partitionDisk, eraseDisk, or
eraseVolume verbs. If you desire a more sophisticated erase algorithm or if you need to erase only
free space not in use for files, use the secureErase verb. The force parameter causes best-effort,
non-error-terminating, forced unmounts and shared-mode writes to be attempted; however, this is still
no guarantee against drivers which claim the disk exclusively. In such cases, you may have to first
unmount all overlying logical volumes (e.g. CoreStorage or AppleRAID), or, if a disk is partially dam-
aged in just the wrong way, even un-install a kext or erase the disk elsewhere. Ownership of the
affected disk is required.
randomDisk [times] device
Erase a whole disk, writing random data to the media. Times is the optional (defaults to 1) number of
times to write random information. The device can be a whole-disk or a partition. In either case, in
order to be useful again, randomized whole-disks will need to be (re)partitioned, or randomized parti-
tions will need to be (re)formatted with a file system, e.g. by using the partitionDisk or eraseDisk
verbs. If you desire a more sophisticated erase algorithm or if you need to erase only free space not
in use for files, use the secureErase verb. Ownership of the affected disk is required.
secureErase [freespace] level device
Erase, using a secure method, either a whole-disk (including any and all partitions), or, only the free
space (not in use for files) on a currently-mounted volume. Erasing a whole-disk will leave it useless
until it is partitioned again. Erasing freespace on a volume will leave it exactly as it was from an
end-user perspective, with the exception that it will not be possible to recover deleted files or data
using utility software. If you need to erase all contents of a partition but not its hosting whole-
disk, use the zeroDisk or randomDisk verbs. Ownership of the affected disk is required.
Level should be one of the following:
o 0 - Single-pass zero-fill erase.
o 1 - Single-pass random-fill erase.
o 2 - US DoD 7-pass secure erase.
o 3 - Gutmann algorithm 35-pass secure erase.
o 4 - US DoE algorithm 3-pass secure erase.
diskutil secureErase 0 /dev/diskX
。