diskutil list
In the output of previous command, search the sdcard and look for the identifier.
If we want to to format the sdcard to the desired format (FAT32), with the name of "SDCARD", located on /dev/desk1, we should execute the following command:
sudo diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/disk1