Quick erase?

bwana

MyBroadband
Super Moderator
Joined
Feb 23, 2005
Messages
97,646
Reaction score
37,759
Location
Plz
I use/reuse a lot of usb flash drives in the course of the day and before I send them out again I like to erase/format the drive to get rid of any windows pestilence that might have found its way on to the stick.

Anyone know of a quicker way to do this than opening Disk Utility and doing it from there?
 
Code:
sudo newfs_msdos -F32 /dev/rdisk1s1

You'd have to be sure that the device is rdisk1s1. The easiest way to be sure is to do:

Code:
ls -l /dev/rdisk*

before inserting it, and again after, and see which device has been added. Maybe you can string something together with automator.
 
Code:
sudo newfs_msdos -F32 /dev/rdisk1s1

You'd have to be sure that the device is rdisk1s1. The easiest way to be sure is to do:

Code:
ls -l /dev/rdisk*

before inserting it, and again after, and see which device has been added. Maybe you can string something together with automator.

Seems kinda dangerous.
 
Code:
sudo newfs_msdos -F32 /dev/rdisk1s1

You'd have to be sure that the device is rdisk1s1. The easiest way to be sure is to do:

Code:
ls -l /dev/rdisk*

before inserting it, and again after, and see which device has been added. Maybe you can string something together with automator.

you could also terminal the mac way ;)

Code:
diskutil list

Code:
diskutil eraseDisk MS-DOS FAT32 Utitled MS-DOS FAT32 /dev/disk*
 
you could also terminal the mac way ;)

Code:
diskutil list

Code:
diskutil eraseDisk MS-DOS FAT32 Utitled MS-DOS FAT32 [b]/dev/disk[/b]*
Now assuming that I have numerous usb drives and use whatever usb port is available is the disk number going to remain constant?
 
Now assuming that I have numerous usb drives and use whatever usb port is available is the disk number going to remain constant?

can't say if the name remains constant, but diskutil list will confirm the size, name and format.


Code:
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *14.9 Gi    disk2
   1:                        EFI                         200.0 Mi   disk2s1
   2:                  Apple_HFS Untitled                14.6 Gi    disk2s2
 
can't say if the name remains constant, but diskutil list will confirm the size, name and format.


Code:
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *14.9 Gi    disk2
   1:                        EFI                         200.0 Mi   disk2s1
   2:                  Apple_HFS Untitled                14.6 Gi    disk2s2
Thanks but I'm looking for a simple solution. I know . . . I'm lazy :o
 
And yet there seems to be no easy way to format from the finder.

And dont get me started on those stupid little droppings osx leaves on memory sticks which confuse the heck out of PC users.
 
And dont get me started on those stupid little droppings osx leaves on memory sticks which confuse the heck out of PC users.

They're actually there for a good reason. HFS+ allows for metadata to be stored in the filesystem, which FAT/NTFS doesn't. So it creates that extra file with that information in.
 
Top
Sign up to the MyBroadband newsletter
X