Terminal erase free space

Discussion in 'macOS Sierra (10.12)' started by Tech198, Feb 11, 2017.

  1. Tech198 macrumors G4

    Joined:
    Mar 21, 2011
    Location:
    Australia, Perth
    #1
    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.
     
  2. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #2
    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.
     

Share This Page