Name
disktool
Synopsis
disktool [-l | -r | -x | -y] disktool [-d | -e | -g | -m | -p | -u | -A | -D | -S]devicedisktool -sdevice integer_flagdisktool -ndevice vol_namedisktool -adevice vol_name vol_flagsdisktool -cuserID
Controls disks, including mounting, unmounting, ejecting, enabling
permissions, and volume naming. Most options require a device name
argument (e.g., disk0), and some require
additional parameters.
Options
-
-a Add disk to Disk Arbitration tables to notify applications of a mounted volume. This is useful if you have forced a mount, thus bypassing standard notification.
-
-A Activate permissions on the volume, adding an entry to
/var/db/volinfo.databaseif one doesn’t already exist.-
-c Specify UID of account to use when mounting disks.
-
-d Remove disk from Disk Arbitration tables, to notify applications of a dismount. This is useful if you have forced a dismount, thus bypassing standard notification.
-
-D Deactivate permissions on the volume.
-
-e Eject disk.
-
-g Print HFS encoding on a volume to standard output.
-
-l List disk volumes to standard output.
-
-m Mount disk.
-
-n Give the device a new volume name. For HFS, HFS+, and UFS partitions only.
-
-p Unmount partition. Device name is that of a partition (e.g.,
disk0s5).-
-r Refresh Disk Arbitration tables.
-
-s Set HFS encoding on a volume. Takes encoding as additional integer argument.
-
-S Print status of volume in
/var/db/volinfo.databaseto standard output.-
-u Unmount disk.
-
-x Disallow dismounts and ejects.
-
-y Allow dismounts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access