1 //po4a: entry man manual
3 partx.8 -- man page for partx
4 Copyright 2007 Karel Zak <kzak@redhat.com>
5 Copyright 2007 Red Hat, Inc.
6 Copyright 2010 Davidlohr Bueso <dave@gnu.org>
7 May be distributed under the GNU General Public License
11 :man manual: System Administration
12 :man source: util-linux {release-version}
18 partx - tell the kernel about the presence and numbering of on-disk partitions
22 *partx* [*-a*|*-d*|*-P*|*-r*|*-s*|*-u*] [*-t* _type_] [*-n* _M_:_N_] [-] _disk_
24 *partx* [*-a*|*-d*|*-P*|*-r*|*-s*|*-u*] [*-t* _type_] _partition_ [_disk_]
28 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.
30 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:
33 partx --show - /dev/sda3
36 This will see sda3 as a whole-disk rather than as a partition.
38 *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.
43 Add the specified partitions, or read the disk and add all partitions.
46 include::man-common/in-bytes.adoc[]
49 Delete the specified partitions or all partitions. It is not error to remove non-existing partitions, so this option is possible to use together with large *--nr* ranges without care about the current partitions set on the device.
51 *-g*, *--noheadings*::
52 Do not print a header line with *--show* or *--raw*.
55 List the partitions. Note that all numbers are in 512-byte sectors. This output format is DEPRECATED in favour of *--show*. Do not use it in newly written scripts.
57 *-n*, *--nr* __M__**:**_N_::
58 Specify the range of partitions. For backward compatibility also the format __M__**-**_N_ is supported. The range may contain negative numbers, for example *--nr -1:-1* means the last partition, and *--nr -2:-1* means the last two partitions. Supported range specifications are:
61 Specifies just one partition (e.g. *--nr 3*).
63 Specifies the lower limit only (e.g. *--nr 2:*).
65 Specifies the upper limit only (e.g. *--nr :4*).
67 Specifies the lower and upper limits (e.g. *--nr 2:4*).
69 *-o*, *--output* _list_::
70 Define the output columns to use for *--show*, *--pairs* and *--raw* output. If no output arrangement is specified, then a default set is used. Use *--help* to get _list_ of all supported columns. This option cannot be combined with the *--add*, *--delete*, *--update* or *--list* options.
73 Output all available columns.
76 List the partitions using the KEY="value" format.
79 List the partitions using the raw output format.
82 List the partitions. The output columns can be selected and rearranged with the *--output* option. All numbers (except SIZE) are in 512-byte sectors.
84 *-t*, *--type* _type_::
85 Specify the partition table type.
88 List supported partition types and exit.
91 Update the specified partitions.
93 *-S*, *--sector-size* _size_::
94 Overwrite default sector size.
99 include::man-common/help-version.adoc[]
104 enables libblkid debug output.
108 partx --show /dev/sdb3::
109 partx --show --nr 3 /dev/sdb::
110 partx --show /dev/sdb3 /dev/sdb::
111 All three commands list partition 3 of _/dev/sdb_.
113 partx --show - /dev/sdb3::
114 Lists all subpartitions on _/dev/sdb3_ (the device is used as whole-disk).
116 partx -o START -g --nr 5 /dev/sdb::
117 Prints the start sector of partition 5 on _/dev/sdb_ without header.
119 partx -o SECTORS,SIZE /dev/sda5 /dev/sda::
120 Lists the length in sectors and human-readable size of partition 5 on _/dev/sda_.
122 partx --add --nr 3:5 /dev/sdd::
123 Adds all available partitions from 3 to 5 (inclusive) on _/dev/sdd_.
125 partx -d --nr :-1 /dev/sdd::
126 Removes the last partition on _/dev/sdd_.
130 mailto:dave@gnu.org[Davidlohr Bueso],
131 mailto:kzak@redhat.com[Karel Zak]
133 The original version was written by mailto:aeb@cwi.nl[Andries E. Brouwer]
143 include::man-common/bugreports.adoc[]
145 include::man-common/footer.adoc[]
148 include::man-common/translation.adoc[]