0

I'm trying to format my usb drive that is partitioned with FAT32 by the following command in Terminal:

$ diskutil eraseDisk JHFS+ UntitledUFS disk1

However, I get this output:

Started erase on disk1
Unmounting disk
Error: 12: POSIX reports: Cannot allocate memory
1

It could be likely that you are not running the command as admin (Unix root) user.

To run a command with administrator privileges use the sudo command so:

$ sudo diskutil eraseDisk JHFS+ UntitledUFS disk1

The error message can lead one astray giving the impression that something else is wrong but it is likely a permissions issue.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .