diskutil
is a very powerful utility within OS X that lets you do all sorts of things to the various storage media on your system. I use it to clear USB drives, since it’s really annoying to have to go into the .Trashes
directory and kill the 501
contents (not to mention all the other artifacts, e.g. spotlight, cache, etc.)
So here’s a quick way to get everything off of a USB drive (or whatever kind of drive) using the OS X command line.
[bash]diskutil eraseVolume MS-DOS NEWNAME /Volumes/OLDNAME/[/bash]
To add more security, consider adding in one of the following options:
- zeroDisk (Erase a disk, writing zeros to the media)
- randomDisk (Erase a disk, writing random data to the media)
- secureErase (Securely erase a disk or freespace on a volume)