Formatting usb flash drive on Mac OS X [closed]
开发者_如何学编程
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this questionHow can I format an USB flash drive using cocoa frameworks or carbon? Is there any functions to make it?
You could use diskutil via NSTask. You may have to authorize the task.
Open Terminal in Mac
Get list of disk using below command
$ diskutil list
Note the name of your USB drive and enter below command
$ sudo diskutil eraseDisk FAT32 DISK2 MBRFormat /dev/disk2
Note : Need to enter disk name only in capital letters after FAT32 (mine is DISK2)
精彩评论