]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/partx.8
docs: adjust some formatting and wordings in a handful of man pages
[thirdparty/util-linux.git] / disk-utils / partx.8
1 .\" partx.8 --
2 .\" Copyright 2007 Karel Zak <kzak@redhat.com>
3 .\" Copyright 2007 Red Hat, Inc.
4 .\" Copyright 2010 Davidlohr Bueso <dave@gnu.org>
5 .\" May be distributed under the GNU General Public License
6 .\"
7 .TH PARTX "8" "December 2014" "util-linux" "System Administration"
8 .SH NAME
9 partx \- tell the Linux kernel about the presence and numbering of on-disk partitions
10 .SH SYNOPSIS
11 .B partx
12 .RB [ \-a | \-d | \-s | \-u ]
13 .RB [ \-t " \fItype\fR]"
14 .RB [ \-n " \fIM" : \fIN\fR]
15 .RB [ \- "] " \fIdisk
16 .br
17 .B partx
18 .RB [ \-a | \-d | \-s | \-u ]
19 .RB [ \-t " \fItype\fR]"
20 .IR partition " [" disk ]
21 .SH DESCRIPTION
22 Given a device or disk-image,
23 .B partx
24 tries to parse the partition table and list its contents. It
25 optionally adds or removes partitions.
26 .PP
27 The
28 .I disk
29 argument is optional when a
30 .I partition
31 argument is provided. To force scanning a partition as if it were a whole disk
32 (for example to list nested subpartitions), use the argument "\-" (hyphen-minus). For example:
33
34 .RS 7
35 .TP
36 partx \-\-show \- /dev/sda3
37 .RE
38 .PP
39 This will see sda3 as a whole-disk rather than a partition.
40 .PP
41 The
42 .B partx is not an fdisk program
43 \(en adding and removing partitions does not change the disk, it just
44 tells the kernel about the presence and numbering of on-disk
45 partitions.
46 .SH OPTIONS
47 .TP
48 .BR \-a , " \-\-add"
49 Add the specified partitions, or read the disk and add all partitions.
50 .TP
51 .BR \-b , " \-\-bytes"
52 Print the SIZE column in bytes rather than in human-readable format.
53 .TP
54 .BR \-d , " \-\-delete"
55 Delete the specified partitions or all partitions.
56 .TP
57 .BR \-g , " \-\-noheadings"
58 Do not print a header line.
59 .TP
60 .BR \-l , " \-\-list"
61 List the partitions. Note that all numbers are in 512-byte sectors.
62 This output format is DEPRECATED in favour of
63 .BR \-\-show .
64 Do not use it in newly written scripts.
65 .TP
66 .BR \-n , " \-\-nr " \fIM : \fIN
67 Specify the range of partitions. For backward compatibility also the
68 format \fIM\fB\-\fIN\fR is supported.
69 The range may contain negative numbers, for example
70 .B \-\-nr :\-1
71 means the last partition, and
72 .B \-\-nr \-2:\-1
73 means the last two partitions. Supported range specifications are:
74 .RS 14
75 .TP
76 .I M
77 Specifies just one partition (e.g.\& \fB\-\-nr 3\fR).
78 .TP
79 .IB M :
80 Specifies the lower limit only (e.g.\& \fB\-\-nr 2:\fR).
81 .TP
82 .BI : N
83 Specifies the upper limit only (e.g.\& \fB\-\-nr :4\fR).
84 .TP
85 .IB M : N
86 Specifies the lower and upper limits (e.g.\& \fB\-\-nr 2:4\fR).
87 .RE
88 .TP
89 .BR \-o , " \-\-output " \fIlist
90 Define the output columns to use for
91 .B \-\-show
92 and
93 .B \-\-raw
94 output. If no output arrangement is specified, then a default set is
95 used. Use
96 .B \-\-help
97 to get
98 .I list
99 of all supported columns. This option cannot be combined with the
100 .BR \-\-add ,
101 .BR \-\-delete ,
102 or
103 .B \-\-list
104 options.
105 .TP
106 .BR \-P , " \-\-pairs"
107 Output using key="value" format.
108 .TP
109 .BR \-r , " \-\-raw"
110 Use the raw output format.
111 .TP
112 .BR \-s , "\-\-show"
113 List the partitions. All numbers (except SIZE) are in 512-byte sectors.
114 The output columns can be rearranged with the \fB\-\-output\fR option.
115 .TP
116 .BR \-t , " \-\-type " \fItype
117 Specify the partition table type, which can be one of
118 .BR aix ,
119 .BR bsd ,
120 .BR dos ,
121 .BR gpt ,
122 .BR mac ,
123 .BR minix ,
124 .BR sgi ,
125 .BR solaris_x86 ,
126 .BR sun ,
127 .BR ultrix ,
128 or
129 .BR unixware .
130 .TP
131 .BR \-u , " \-\-update"
132 Update the specified partitions.
133 .TP
134 .BR \-v , " \-\-verbose"
135 Verbose mode.
136 .TP
137 .BR \-V , " \-\-version"
138 Display version information and exit.
139 .TP
140 .BR \-h , " \-\-help"
141 Display help text and exit.
142 .SH EXAMPLES
143 .TP
144 partx \-\-show /dev/sdb3
145 .TQ
146 partx \-\-show \-\-nr 3 /dev/sdb
147 .TQ
148 partx \-\-show /dev/sdb3 /dev/sdb
149 All three commands list partition 3 of /dev/sdb.
150 .TP
151 partx \-\-show \- /dev/sdb3
152 Lists all subpartitions on /dev/sdb3 (the device is used as
153 whole-disk).
154 .TP
155 partx \-o START \-g \-\-nr 5 /dev/sdb
156 Prints the start sector of partition 5 on /dev/sdb without header.
157 .TP
158 partx \-o SECTORS,SIZE /dev/sda5 /dev/sda
159 Lists the length in sectors and human-readable size of partition 5 on
160 /dev/sda.
161 .TP
162 partx \-\-add \-\-nr 3:5 /dev/sdd
163 Adds all available partitions from 3 to 5 (inclusive) on /dev/sdd.
164 .TP
165 partx \-d \-\-nr :\-1 /dev/sdd
166 Removes the last partition on /dev/sdd.
167 .SH SEE ALSO
168 .BR addpart (8),
169 .BR delpart (8),
170 .BR fdisk (8),
171 .BR parted (8),
172 .BR partprobe (8)
173 .SH AUTHORS
174 .MT dave@gnu.org
175 Davidlohr Bueso
176 .ME
177 .br
178 .MT kzak@redhat.com
179 Karel Zak
180 .ME
181 .PP
182 The original version was written by
183 .MT aeb@cwi.nl
184 Andries E.\& Brouwer
185 .ME .
186 .SH ENVIRONMENT
187 .IP LIBBLKID_DEBUG=all
188 enables libblkid debug output.
189 .SH AVAILABILITY
190 The partx command is part of the util-linux package and is available from
191 .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
192 Linux Kernel Archive
193 .UE .