]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/partx.8.adoc
fsck: use BLKID_SUBLKS_BADCSUM
[thirdparty/util-linux.git] / disk-utils / partx.8.adoc
1 //po4a: entry man manual
2 ////
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
8 ////
9 = partx(8)
10 :doctype: manpage
11 :man manual: System Administration
12 :man source: util-linux {release-version}
13 :page-layout: base
14 :command: partx
15
16 == NAME
17
18 partx - tell the kernel about the presence and numbering of on-disk partitions
19
20 == SYNOPSIS
21
22 *partx* [*-a*|*-d*|*-P*|*-r*|*-s*|*-u*] [*-t* _type_] [*-n* _M_:_N_] [-] _disk_
23
24 *partx* [*-a*|*-d*|*-P*|*-r*|*-s*|*-u*] [*-t* _type_] _partition_ [_disk_]
25
26 == DESCRIPTION
27
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.
29
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:
31
32 ____
33 partx --show - /dev/sda3
34 ____
35
36 This will see sda3 as a whole-disk rather than as a partition.
37
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.
39
40 == OPTIONS
41
42 *-a*, *--add*::
43 Add the specified partitions, or read the disk and add all partitions.
44
45 *-b*, *--bytes*::
46 include::man-common/in-bytes.adoc[]
47
48 *-d*, *--delete*::
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.
50
51 *-g*, *--noheadings*::
52 Do not print a header line with *--show* or *--raw*.
53
54 *-l*, *--list*::
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.
56
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:
59 +
60 _M_;;
61 Specifies just one partition (e.g. *--nr 3*).
62 __M__**:**;;
63 Specifies the lower limit only (e.g. *--nr 2:*).
64 **:**__N__;;
65 Specifies the upper limit only (e.g. *--nr :4*).
66 __M__**:**_N_;;
67 Specifies the lower and upper limits (e.g. *--nr 2:4*).
68
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.
71
72 *--output-all*::
73 Output all available columns.
74
75 *-P*, *--pairs*::
76 List the partitions using the KEY="value" format.
77
78 *-r*, *--raw*::
79 List the partitions using the raw output format.
80
81 *-s*, *--show*::
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.
83
84 *-t*, *--type* _type_::
85 Specify the partition table type.
86
87 *--list-types*::
88 List supported partition types and exit.
89
90 *-u*, *--update*::
91 Update the specified partitions.
92
93 *-S*, *--sector-size* _size_::
94 Overwrite default sector size.
95
96 *-v*, *--verbose*::
97 Verbose mode.
98
99 include::man-common/help-version.adoc[]
100
101 == ENVIRONMENT
102
103 LIBBLKID_DEBUG=all::
104 enables libblkid debug output.
105
106 == EXAMPLE
107
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_.
112
113 partx --show - /dev/sdb3::
114 Lists all subpartitions on _/dev/sdb3_ (the device is used as whole-disk).
115
116 partx -o START -g --nr 5 /dev/sdb::
117 Prints the start sector of partition 5 on _/dev/sdb_ without header.
118
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_.
121
122 partx --add --nr 3:5 /dev/sdd::
123 Adds all available partitions from 3 to 5 (inclusive) on _/dev/sdd_.
124
125 partx -d --nr :-1 /dev/sdd::
126 Removes the last partition on _/dev/sdd_.
127
128 == AUTHORS
129
130 mailto:dave@gnu.org[Davidlohr Bueso],
131 mailto:kzak@redhat.com[Karel Zak]
132
133 The original version was written by mailto:aeb@cwi.nl[Andries E. Brouwer]
134
135 == SEE ALSO
136
137 *addpart*(8),
138 *delpart*(8),
139 *fdisk*(8),
140 *parted*(8),
141 *partprobe*(8)
142
143 include::man-common/bugreports.adoc[]
144
145 include::man-common/footer.adoc[]
146
147 ifdef::translation[]
148 include::man-common/translation.adoc[]
149 endif::[]