Specifications
Chapter 7 Working with Disks and Volumes 91
To get mount info about a partition:
$ diskutil info
diskvol
This command tells you the device file that corresponds to the mounted partition
(or device name) you specify.
To format a Mac OS Extended volume as case-sensitive HFS+:
$ sudo diskutil eraseVolume "Case-sensitive HFS+"
newvolname
volume
For more options and information about repairing and modifying disks, see the
diskutil man page.
Using the pdisk, disklabel, and newfs Tools
Disk partitions are subdivisions of a disk that you apply operating-system-specific
formatting to.
Partitioning a Disk
You can use pdisk, located in /usr/sbin, to initialize the disk, create partitions, and
delete partitions. The pdisk tool is menu-driven, which means that when it is launched,
you are prompted to enter a pdisk command. You can find the commands by entering
? at the pdisk prompt.
The following are some of the more useful commands:
Parameter Description
diskvol
Device name (for example, disk0s9) for the partition
Parameter Description
newvolname
The name given to the reformatted, case-sensitive volume
volume
The path to the existing volume to be reformatted
For example:
/Volumes/HFSPlus
Command Description
L Lists the partition maps of all drives. pdisk lists all partitions for a diskāeven the
unmountable partitions, such as the partition containing the partition map.
e Edits the partition map of the named device. To edit a partition map, use the raw
device file as the argument.