Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Tech198

Cancelled
Original poster
Mar 21, 2011
15,915
2,152
When using [freespace] option in Terminal when using diskutil, is there a way to just wipe x passes over the file u want to be secure erased ? or is it free space only (which would be to all deleted files weather u have only 1 or more) ? (eg drag and drop path as part of the command.
 
diskutil is for disks, not files. You use ‘diskutil secureErase’ to erase and overwrite the disk, whereas you use ‘diskutil secureErase freespace’ to overwrite the currently unused space on the disk. If you want to delete a particular file, then you can only use ‘rm -P <file>’ in macOS Sierra.

Apple removed the previous ‘srm’ command that securely erases files. If you are using an SSD, you should not be using any of these operations.

My advice is to use file-system encryption and encrypted disk images.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.