pdisk (MkLinux)

Apple partition table editor.

Syntax
      pdisk [-acdfhilLrv] [--abbr] [--compute_size] [--debug] [--fname] [--interactive]
         [--list] [--logical] [--readonly] [--help] [--version]
            [device ...]

Options

   -a
   --abbr
      Abbreviate the partition types shown in the partition list.

   -c
   --compute_size
      Cause pdisk to always ignore the device size listed in the partition table and compute the
      device size by other means.

   -d
   --debug
      Turn on debugging.  Doesn't add that much output, but does add a new command ‘x’ to
      the editing commands that accesses an eclectic bunch of undocumented functionality.

   -f
   --fname
      Show HFS volume names instead of partition name when available.

   -h
   --help
      Print a short help message.

   -i
   --interactive
      Causes pdisk to go into an interactive mode similar to the MacOS version of the program.

   -l
   --list
      If no device argument is given, pdisk tries to list partition tables for all available drives.
      Otherwise, pdisk lists the partition tables for the specified devices.

   -L
   --logical
      Show partition limits in logical blocks. Default is physical blocks.

   -r
   --readonly
      Prevent pdisk from writing to the device.

   -v
   --version
      Print the version number of pdisk.

The pdisk utility was originally developed for MkLinux. The main clients for the MacOS version of pdisk are MkLinux users. 
Versions of MkLinux run on the Intel, PA-RISC, and PowerPC architectures. Apple dropped support for MkLinux in 1999.

Editing Partition Tables
An argument which is simply the name of a device indicates that pdisk should edit the partition table of that device.

The current top level editing commands are:

   C    (create with type also specified)
   c    Create new partition
   d    Delete a partition
   h    Command help
   i    initialize partition map
   n    (re)name a partition
   P    (print ordered by base address)
   p    Print the partition table
   q    Quit editing (don't save changes)
   r    Reorder partition entry in map
   s    Change size of partition map
   t    Change the type of an existing partition
   w    Write the partition table

Commands which take arguments prompt for each argument in turn. You can also type any number of the arguments separated by spaces and those prompts will be skipped. The only exception to typeahead are the confirmation prompts on the i and w commands, since if we expect you to confirm the decision, we shouldn't undermine that by allowing you to be precipitate about it.

Partitions are always specified by their number, which is the index of the partition entry in the partition map. Most of the commands will change the index numbers of all partitions after the affected partition. You are advised to print the table as frequently as necessary.

The c (create new partition) command is the only one with complicated arguments.

     The C command is similar to the c command, with the addition of a partition type argument after the other arguments.

     The i (initalize) command prompts for the size of the device.

     The n (name) command allows the name of a partition to be changed.

     The r (reorder) command allows the index number of partitions to be changed.
     The index numbers are constrained to be a contiguous sequence.

     The t (change partition type) command allows the type of a partition to be changed.

     The w (write) command writes the partition map out.

Filesystem volume names are out of place in a partition utility.

The --logical option has not been heavily tested.

“A small-sized organization, one that has few employees, is optimally structured by a centralized structure in which decision-making authority is concentrated at the top of the hierarchy, whereas a large organization, one that has many employees, is optimally structured by a decentralized structure in which decision-making authority is dispersed down to lower levels of the hierarchy” ~ Lex Donaldson

Related macOS commands

Local man page: pdisk - Command line help page on your local machine.
diskutil - Disk utilities - Format, Verify, Repair.
gpt - GUID partition table maintenance utility.
fdisk - Partition table manipulator for Darwin UFS/HFS/DOS.
mount - Mount a file system.


 
Copyright © 1999-2026 SS64.com
Some rights reserved