Format Command For Os X

All external USB disks can be formatted to work on Mac OSX, but not always straight out of the box.

  1. Format Command For Os X 1

In this tutorial we look at formatting disks via the GUI app called Disk Utility and its equivalent command line tool diskutil. This will work in all modern versions of Apple Mac OSX including 10.9 Mavericks, 10.8, 10.7 and 10.6.

Initially external disks may be formatted for Windows and after you connect it to your Mac it appears in the device list in the Finder, but is a read only disk meaning that you can’t write to it in its current format.

The when the disk is selected in the finder bottom left symbol with the crossed out pencil means that the disk can only be read not written to. Why this is, is because they come formatted as Windows NTFS drive which OSX can only read, so we need to reformat them so we can read and write – thats where a handy utility called Disk Utility comes to the rescue.

Disk Utility

Disk Utility is found in /Applications/Utilities/Disk Utility.app, open it and select your external disk in the list on the left.

There are 2 items (or more) for each disk, you have the actual disk and the volume of the disk, the example below has the Disk Named 2 TB WD Elements and the Volume is named Elements, this example uses the Volume which will in turn also format the Disk.

Then below you will see the Format type which will be NTFS or possibly MS-DOS (FAT), we need to reformat the volume and make the format Mac OS Extended (Journaled).

The availability of certain format command switches and other format command syntax may differ from operating system to operating system. Format Command (Windows 10). /x: This format command option will cause the drive to dismount, if it has to, before the format. /l: This switch. `date` command on OS X doesn't have ISO 8601 `-I` option? Ask Question Asked 8 years. 2013-05-03 15:59 (T is required in the extended format) 201305 (it could be. Oct 19, 2018  How to Change the Screenshot File Format of Mac OS X: It is actually very easy to change the format file of your Macbook’s screenshots. Here’s what you need to do first: Launch Terminal by opening your Applications folder through pressing Shift + Command + A at the same time. When on the Utilities folder, go search for Terminal.

Reformatting the Disk

Still with the external disk selected in Disk Utility go to the Erase tab, select Mac OS Extended (Journaled) from the format dropdown, choose to name the disk and then click Erase.

And there you have it one read and writable disk ready for OSX.

The Security Options option next to erase can control how the disk is erased by zeroing out all the blocks on the disk, this then make it impossible to salvage any previous data, with new disks this is not necessary.

Also the other format option Mac OS Extended (Case-sensitive, Journaled) in the dropdown would allow you have same name files or folders in the same location with a mix of case like ‘red’ and ‘RED’, this is popular in the Linux disk format and also possible on OSX but not the default on OSX shipped disks.

Format

Doing it on the line

You can also do this using the command line using the tool diskutil which is the command line interface to Disk Utility, launch Terminal, Applications/Utilities/Terminal – to see a list of your disks:

Safari for mac os x lion

and the results are similar to:

This gives us a lot of information including the disk identifiers, size of disk and partitioning scheme. So in this example we will reformat the actual disk, disk2 using the command:

Here the command diskutil eraseDisk does the erasing, format is expressed as JHFS+ which is the Mac OS Extended (Journaled) and disk is named BackupMaster and the actual target disk is defined by its identifier disk2. The Terminal will result in this output:

Format Command For Os X 1

And there you have it one formatted disk ready to go.

Format Command For Os X -->

Applies to: Windows 10, Windows Server 2016

Formats a disk to accept Windows files. You must be a member of the Administrators group to format a hard drive.

If you’re using one of these computers with OS X Mavericks or later,. you can install macOS Catalina.Your Mac also needs at least 4GB of memory and 12.5GB of available storage space, or up to 18.5GB of storage space when upgrading from OS X Yosemite or earlier. MacBook introduced in 2015 or later MacBook Air introduced in 2012 or later MacBook Pro introduced in 2012 or later. NOTE: Mac OS Sierra (10.12.x), High Sierra (10.13.x), Mojave (10.14.x) or Catalina (10.15.x) computers do not need a CAC Enabler. Try to access the CAC enabled site you need to access now. Mac support provided by: Michael Danberry: If you have questions or suggestions for this site, contact Michael J. Pclinq2 software for mac os x 10.

Note

You can also use the format command, with different parameters, from the Recovery Console. For more information about the recovery console, see Windows Recovery Environment (Windows RE).

Syntax

Parameters

ParameterDescription
<volume>Specifies the mount point, volume name, or drive letter (followed by a colon) of the drive that you want to format. If you do not specify any of the following command-line options, format uses the volume type to determine the default format for the disk.
/fs:{FATFAT32NTFS}Specifies the type of file system (FAT, FAT32, NTFS).
/v:<label>Specifies the volume label. If you omit the /v command-line option or use it without specifying a volume label, format prompts you for the volume label after the formatting is complete. Use the syntax /v: to prevent the prompt for a volume label. If you use a single format command to format more than one disk, all of the disks will be given the same volume label.
/a:<unitsize>Specifies the allocation unit size to use on FAT, FAT32, or NTFS volumes. If you don't specify unitsize, it's chosen based on volume size. Default settings are strongly recommended for general use. The following list presents valid values for NTFS, FAT, and FAT32 unitsize:
  • 512
  • 1024
  • 2048
  • 4096
  • 8192
  • 16K
  • 32K
  • 64K
FAT and FAT32 also support 128K and 256K for a sector size greater than 512 bytes.
/qPerforms a quick format. Deletes the file table and the root directory of a previously formatted volume, but does not perform a sector-by-sector scan for bad areas. You should use the /q command-line option to format only previously formatted volumes that you know are in good condition. Note that /q overrides /p.
/f:<size>Specifies the size of the floppy disk to format. When possible, use this command-line option instead of the /t and /n command-line options. Windows accepts the following values for size:
  • 1440 or 1440k or 1440kb
  • 1.44 or 1.44m or 1.44mb
  • 1.44-MB, double-sided, quadruple-density, 3.5-inch disk
/t:<tracks>Specifies the number of tracks on the disk. When possible, use the /f command-line option instead. If you use the /t option, you must also use the /n option. These options together provide an alternative method of specifying the size of the disk that is being formatted. This option is not valid with the /f option.
/n:<sectors>Specifies the number of sectors per track. When possible, use the /f command-line option instead of /n. If you use /n, you must also use /t. These two options together provide an alternative method of specifying the size of the disk that is being formatted. This option is not valid with the /f option.
/p:<passes>Zeros every sector on the volume for the number of passes specified. This option is not valid with the /q option.
/cNTFS only. Files created on the new volume will be compressed by default.
/xCauses the volume to dismount, if necessary, before it's formatted. Any open handles to the volume will no longer be valid.
/?Displays help at the command prompt.

Remarks

  • The format command creates a new root directory and file system for the disk. It can also check for bad areas on the disk, and it can delete all data on the disk. To be able to use a new disk, you must first use this command to format the disk.

  • After formatting a floppy disk, format displays the following message:

    Volume label (11 characters, ENTER for none)?

    To add a volume label, type up to 11 characters (including spaces). If you do not want to add a volume label to the disk, press ENTER.

  • When you use the format command to format a hard disk, a warning message similar to the following displays:

    To format the hard disk, press Y; if you do not want to format the disk, press N.

  • FAT file systems restrict the number of clusters to no more than 65526. FAT32 file systems restrict the number of clusters to between 65527 and 4177917.

  • NTFS compression is not supported for allocation unit sizes above 4096.

    Note

    Format will immediately stop processing if it determines that the previous requirements can't be met using the specified cluster size.

  • When formatting is complete, format displays messages that show the total disk space, the spaces marked as defective, and the space available for your files.

  • You can speed up the formatting process by using the /q command-line option. Use this option only if there are no bad sectors on your hard disk.

  • You shouldn't use the format command on a drive that was prepared by using the subst command. You can't format disks over a network.

  • The following table lists each exit code and a brief description of its meaning.

    Exit codeDescription
    0The format operation was successful.
    1Incorrect parameters were supplied.
    4A fatal error occurred (which is any error other than 0, 1, or 5).
    5The user pressed N in response to the prompt 'Proceed with Format (Y/N)?' to stop the process.

    You can check these exit codes by using the ERRORLEVEL environment variable with the if batch command.

Examples

To format a new floppy disk in drive A using the default size, type:

To perform a quick format operation on a previously formatted floppy disk in drive A, type:

To format a floppy disk in drive A and assign it the volume label DATA, type:

Additional References