Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.