Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making a script and I want to take an existing partition and clear it quickly. Rather than using rm I thought there might be a command-line way of formatting or initializing a partition, but I couldn't find it.

share|improve this question
up vote 1 down vote accepted
mkfs -t bfs /dev/disk/ata/0/master/raw
share|improve this answer
I don't want to trash my whole disk...will this also work on /dev/disk/ata/0/master/3 even though it doesn't seem to have a raw subdir if I try autocomplete in a Terminal? – Kev Apr 7 '13 at 21:36
Turns out it will. Thanks! – Kev Apr 14 '13 at 13:44

You must log in to answer this question.

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