Terminal command to reformat a drive in X?

Posted:
in macOS edited January 2014
Is there a set of terminal shell commands that will allow me to erase/reformat a drive in OS X?



What about low-level formatting?

Comments

  • Reply 1 of 8
    I'd be interested in knowing this too. Ahh this brings back memories, when I was a kid during the MS-DOS days, I used to go to all the computer stores and type:



    FORMAT C:



    on every PC
  • Reply 2 of 8
    As far as I know, you cannot low-level format a drive from within an operating system. I have to use a utility provided by IBM to low-level format my drives on my PC, which requires restarting from a set of floppies.



    If you want to get rid of everything on a drive, simply read the man pages for rm. Goto the console and type 'man rm' and hit enter (without the quotes, of course).



    --bradd
  • Reply 3 of 8
    synsyn Posts: 329member
    kestral you little rascal you



    You can format in HFS/+ with the terminal, you can even format in FAT32, using the command:





    sudo newfs_hfs -F 32 /dev/disk1s2



    where /dev/disk1s2 is the UNIX name of your drive, which you can determine in various ways (df is one).



    use newfs_msdos to format to FAT32



    Be very careful with the device name, as you can format the wrong drive/partition because of juste one number...
  • Reply 4 of 8
    eugeneeugene Posts: 8,254member
    What about pdisk?



    man pdisk
  • Reply 5 of 8
    hekalhekal Posts: 117member
    Hahah me too! Or send the C64s into an endless profane loop, while disabling the break mechanism. The clerk had to come power cycle it.



    [quote]Originally posted by Kestral:

    <strong>I'd be interested in knowing this too. Ahh this brings back memories, when I was a kid during the MS-DOS days, I used to go to all the computer stores and type:



    FORMAT C:



    on every PC </strong><hr></blockquote>
  • Reply 6 of 8
    synsyn Posts: 329member
    Hahah me too! Or send the C64s into an endless profane loop, while disabling the break mechanism. The clerk had to come power cycle it.



    heh... brings back memories...



    Still when I see a win9x box I execute c:/con/con, bluescreen garanteed...
  • Reply 7 of 8
    [quote]Originally posted by Eugene:

    <strong>What about pdisk?



    man pdisk</strong><hr></blockquote>

    pdisk is for repartitioning, which is not the same as formatting/creating a file system.
  • Reply 8 of 8
    synsyn Posts: 329member
    wow, BlueGecko, glad to see you here!



    what've you been up to?
Sign In or Register to comment.