PARTX(8) | System Administration | PARTX(8) |
NAME
partx - tell the kernel about the presence and numbering of on-disk partitions
SYNOPSIS
partx [-a|-d|-P|-r|-s|-u] [-t type] [-n M:_N_] [-] disk
partx [-a|-d|-P|-r|-s|-u] [-t type] partition [disk]
DESCRIPTION
Given a device or disk-image, partx tries to parse the partition table and list its contents. It can also tell the kernel to add or remove partitions from its bookkeeping.
The disk argument is optional when a partition argument is provided. To force scanning a partition as if it were a whole disk (for example to list nested subpartitions), use the argument "-" (hyphen-minus). For example:
partx --show - /dev/sda3
This will see sda3 as a whole-disk rather than as a partition.
partx is not an fdisk program - adding and removing partitions does not change the disk, it just tells the kernel about the presence and numbering of on-disk partitions.
OPTIONS
-a, --add
-b, --bytes
By default, the unit, sizes are expressed in, is byte, and unit prefixes are in power of 2^10 (1024). Abbreviations of symbols are exhibited truncated in order to reach a better readability, by exhibiting alone the first letter of them; examples: "1 KiB" and "1 MiB" are respectively exhibited as "1 K" and "1 M", then omitting on purpose the mention "iB", which is part of these abbreviations.
-d, --delete
-g, --noheadings
-l, --list
-n, --nr M:N
M
M:
:N
M:N
-o, --output list
--output-all
-P, --pairs
-r, --raw
-s, --show
-t, --type type
--list-types
-u, --update
-S, --sector-size size
-v, --verbose
-h, --help
-V, --version
ENVIRONMENT
LIBBLKID_DEBUG=all
EXAMPLE
partx --show /dev/sdb3, partx --show --nr 3 /dev/sdb, partx --show /dev/sdb3 /dev/sdb
partx --show - /dev/sdb3
partx -o START -g --nr 5 /dev/sdb
partx -o SECTORS,SIZE /dev/sda5 /dev/sda
partx --add --nr 3:5 /dev/sdd
partx -d --nr -1: /dev/sdd
AUTHORS
Davidlohr Bueso <dave@gnu.org>, Karel Zak <kzak@redhat.com>
The original version was written by Andries E. Brouwer <aeb@cwi.nl>
SEE ALSO
REPORTING BUGS
For bug reports, use the issue tracker at https://github.com/util-linux/util-linux/issues.
AVAILABILITY
The partx command is part of the util-linux package which can be downloaded from Linux Kernel Archive https://www.kernel.org/pub/linux/utils/util-linux/.
2025-01-13 | util-linux 2.40.4 |