
如果您要出售带有硬盘驱动器,硬盘驱动器的旧Mac,或者只是对被淘汰的数据而言只是偏执,它很熟悉,或者应该熟悉Discos实用程序中的“擦除”选项卡中的“可用空间”按钮(在应用程序文件夹 - > UTILISITION中可以找到)。
编者注:该终端建议最初是在2009年3月执行的,仅对机械硬盘驱动器有用,而不是最新Mac中的SSD。
单击此按钮时,会提供三个选项,以安全地删除硬盘上的自由空间:使用零(快速且相对安全)写有关自由空间,写3次(更安全,非常慢)或写出有关自由空间的信息七次(极慢)。
每当出售带有硬盘驱动器的旧机器时,都会使用此功能。形成单元并安装新的MacOS副本,然后使用光盘的效用来删除自由空间(通常只用零仅一次编写一次)。这给了我很好的安全感,因为需要一组专业的专业人员(甚至可能是特殊的硬件)才能恢复我的任何已删除数据。
使用终端安全保护单元
如果您想从终端执行此操作,会发生什么?在终端,一个名为的程序diskutil
它提供了MacOS磁盘实用程序的大多数功能。
(请注意,与许多终端命令一样,如果您在以下说明中犯错误,可能会发生真正的坏事。请谨慎行事,并确保在尝试以下任何一个之前都更新备份副本)。
知道diskutil
详细写man diskutil
在终端指示器中。之内man
页面,您将找到有关如何安全地删除专辑的自由空间的解释diskutil
:
secureErase [freespace] level device Erase, using a "secure" (but see the NOTE below) method, either a whole-disk (including all of its partitions if partitioned), or, only the free space (not in use for files) on a currently-mounted volume. Secure erasing makes it harder to recover data using "file recovery" software. Erasing a whole-disk will leave it useless until it is partitioned again. Erasing freespace on a volume will leave your files intact, indeed, from an end-user perspective, it will appear unchanged, with the exception that it will have attempted to make it impossible to recover deleted files. 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 - Seven-pass erase, consisting of zero fills and all-ones fills plus a final random fill. o 3 - Gutmann algorithm 35-pass erase. o 4 - Three-pass erase, consisting of two random fills plus a final zero fill. NOTE: This kind of secure erase is no longer considered safe. Modern devices have wear-leveling, block-sparing, and possibly-persistent cache hardware, which cannot be completely erased by these commands. The modern solution for quickly and securely erasing your data is encryption. Strongly-encrypted data can be instantly "erased" by destroying (or losing) the key (password), because this renders your data irretrievable in practical terms. Consider using APFS encryption (FileVault).
但是您如何找出要列出的内容device
什么是试图安全擦除的自由空间的专辑(或分区)?diskutil
您还可以提供该信息。仅使用diskutil list
查看所有单元和分区的列表。最后,您会看到一个IDENTIFIER
柱子;该列包含标识符diskutil
需要。这是一个例子list
在我的机器上出发:

IDG
您只需要知道最后一个事实才能从命令行中删除自由空间。在UNIX中,所有设备都作为存档系统树的一部分出现,在MacOS中,所有设备都列在/dev
目录。所以如果我想使用diskutil
消除我的自由空间Apple_HFS Untitled
在我的外部磁盘上,使用一个step方法,将看到最终命令:
diskutil secureErase freespace 1 /dev/disk2s1
警告!es至关重要您包括freespace
该命令的一部分。如果您不这样做diskutil
很高兴将开始安全地删除整张专辑,而不仅仅是自由空间。是的,这真的很糟糕,尤其是因为它将安全擦除,这意味着您不可能恢复数据。
前综合霍伊(Rob Griffiths)的前大四学生创立了Mac OS X提示。现在他是一个仪式大师许多技巧的软件。