Note: You are currently viewing my old web site. There is a new version with most of this content at OJB.NZ.
The new site is being updated, uses modern techniques, has higher quality media, and has a mobile-friendly version.
This old site will stay on-line for a while, but maybe not indefinitely. Please update your bookmarks. Thanks.


[Index] [Menu] [Up] Title[Header]
Tips

(Up to OJB's Mac Tips List Page)


Erase a Disk from Terminal

To erase a Disk from the Command Line...

Get disk identifier, use: diskutil info "DISKNAME" | grep "Device Node"
Then erase disk using: diskutil eraseDisk FILESYSTEM DISKNAME DISKIDENTIFIER

Where FILESYSTEM is JHFS+ (Journalled), HFS+, FAT32
DISKNAME is the name to be given to the disk
DISKIDENTIFIER is the ID returned above (eg /dev/disk6s2)

Erase volume example: diskutil eraseVolume JHFS+ Erased /dev/disk6s2
Erase disk example: diskutil eraseDisk JHFS+ Erased disk6


[Up]

[Contact][Server Blog][AntiMS Apple][Served on Mac]