Skip to content

Instantly share code, notes, and snippets.

@lil12t
Last active December 27, 2020 15:17
Show Gist options
  • Save lil12t/131c1e4fd1967cf659f3c190545f3f4e to your computer and use it in GitHub Desktop.
Save lil12t/131c1e4fd1967cf659f3c190545f3f4e to your computer and use it in GitHub Desktop.
Hard format usb drive on mac OS
# It formats disk2 in format FAT32
# In order to check your disk name run: diskutil list
sudo diskutil eraseDisk FAT32 MYSD MBRFormat /dev/disk2
@lil12t
Copy link
Author

lil12t commented Dec 27, 2020

The script should be used when Disk Utility can't format partition, in my case it has been showing an partition with 4MB available of 4MB (usb drive has 16GB).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment