Site TIPS PAGE🔎   UP ONE LEVEL
 OJB's Web Site. V 2.1.tip tips mac owen2 
Tip

Up to OJB's Mac Tips List

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



My latest blog post: Avoid Microsoft: If you don't really like computers much you could make things a bit better for yourself. (posted 2024-12-04). My latest podcast: OJB's Podcast 2024-08-22 Stirring Up Trouble.
 ©2024 by OJBRSS FeedMS Free ZoneMac Made
T: 11. H: 178,309,438
Features: RSS Feeds Feedback LogMod: 07 Jun 2024