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)