Wednesday, August 26, 2015

Securely Erasing Free Space in Mac OS X

There are two ways to erase free space in Mac OS X, one is using the GUI application Disk Utility, the other is using Terminal.

The one-line Terminal command to scrub free space of existing data is

diskutil secureErase freespace 3 /Volumes/"drive"

You can get the name of your drive by using the following two basic commands to look up the available system drives:

cd /Volumes/

ls


This will list the available drives, which you can copy and paste into the above command for the "drive" path. The command will write to each drive sector 35 times. Thirty-five passes is well above the U.S. Department of Defense’s own standard 7 pass standard for erasing data. Note that with large capacity drives, this process may take a very long time (perhaps hours or days) to complete due to the capacity and work that needs to take place to do a 35-pass wipe of the data. Though I used Yosemite 10.10 this should work no problem in Snow Leopard 10.6, Lion 10.7, Mountain Lion 10.8, Mavericks 10.9, or El Capitan 10.11

Monday, August 24, 2015

Changing screenshot file formats Mac OS X

Using terminal it is easy to change the file format that screen shots are captured by the Mac OS X system.  Simply open up terminal and enter the following command.

defaults write com.apple.screencapture type "extension"

Replace the "extension" word in the command above with the name of the file extension that you actually want as a screenshot. 

For JPG you could type the following command:

defaults write com.apple.screencapture type JPG

You can use PDF, GIF, PNG, and others

Though I used Yosemite 10.10 this should work no problem in Snow Leopard 10.6, Lion 10.7, Mountain Lion 10.8, Mavericks 10.9, or El Capitan 10.11

Saturday, August 22, 2015

Show Hidden Files in Mac OS X

To quickly show hidden files in Mac OS X open up terminal and enter this command. Warning any files that begin with a dot are flagged by UNIX as hidden files. These files can be system or preference files that are required by the system to handle folder and file management. Be careful and cautious before deleting or editing any files that don't look familiar to you. I recommend backing up your system or files before deleting hidden items


defaults write com.apple.finder AppleShowAllFiles TRUE

To hide these files again just change TRUE to FALSE


Though I used Yosemite 10.10 this should work no problem in Snow Leopard 10.6, Lion 10.7, Mountain Lion 10.8, Mavericks 10.9, or El Capitan 10.11