OSDN Git Service

util-linux-2.37.2: Relocate files and directories to update.
[linuxjm/jm.git] / manual / util-linux / original / man8 / partx.8
1 '\" t
2 .\"     Title: partx
3 .\"    Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.15
5 .\"      Date: 2021-06-02
6 .\"    Manual: System Administration
7 .\"    Source: util-linux 2.37.2
8 .\"  Language: English
9 .\"
10 .TH "PARTX" "8" "2021-06-02" "util\-linux 2.37.2" "System Administration"
11 .ie \n(.g .ds Aq \(aq
12 .el       .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 .  mso www.tmac
22 .  am URL
23 .    ad l
24 .  .
25 .  am MTO
26 .    ad l
27 .  .
28 .  LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 partx \- tell the kernel about the presence and numbering of on\-disk partitions
32 .SH "SYNOPSIS"
33 .sp
34 \fBpartx\fP [\fB\-a\fP|\fB\-d\fP|\fB\-P\fP|\fB\-r\fP|\fB\-s\fP|\fB\-u\fP] [\fB\-t\fP \fItype\fP] [\fB\-n\fP \fIM\fP:_N_] [\-] \fIdisk\fP
35 .sp
36 \fBpartx\fP [\fB\-a\fP|\fB\-d\fP|\fB\-P\fP|\fB\-r\fP|\fB\-s\fP|\fB\-u\fP] [\fB\-t\fP \fItype\fP] \fIpartition\fP [\fIdisk\fP]
37 .SH "DESCRIPTION"
38 .sp
39 Given a device or disk\-image, \fBpartx\fP tries to parse the partition table and list its contents. It can also tell the kernel to add or remove partitions from its bookkeeping.
40 .sp
41 The \fIdisk\fP argument is optional when a \fIpartition\fP 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:
42 .RS 3
43 .ll -.6i
44 .sp
45 partx \-\-show \- /dev/sda3
46 .br
47 .RE
48 .ll
49 .sp
50 This will see sda3 as a whole\-disk rather than as a partition.
51 .sp
52 \fBpartx is not an fdisk program\fP \- adding and removing partitions does not change the disk, it just tells the kernel about the presence and numbering of on\-disk partitions.
53 .SH "OPTIONS"
54 .sp
55 \fB\-a\fP, \fB\-\-add\fP
56 .RS 4
57 Add the specified partitions, or read the disk and add all partitions.
58 .RE
59 .sp
60 \fB\-b\fP, \fB\-\-bytes\fP
61 .RS 4
62 Print the SIZE column in bytes rather than in human\-readable format.
63 .RE
64 .sp
65 \fB\-d\fP, \fB\-\-delete\fP
66 .RS 4
67 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 \fB\-\-nr\fP ranges without care about the current partitions set on the device.
68 .RE
69 .sp
70 \fB\-g\fP, \fB\-\-noheadings\fP
71 .RS 4
72 Do not print a header line with \fB\-\-show\fP or \fB\-\-raw\fP.
73 .RE
74 .sp
75 \fB\-l\fP, \fB\-\-list\fP
76 .RS 4
77 List the partitions. Note that all numbers are in 512\-byte sectors. This output format is DEPRECATED in favour of \fB\-\-show\fP. Do not use it in newly written scripts.
78 .RE
79 .sp
80 \fB\-n\fP, \fB\-\-nr\fP \fIM\fP\fB:\fP\fIN\fP
81 .RS 4
82 Specify the range of partitions. For backward compatibility also the format \fIM\fP\fB\-\fP\fIN\fP is supported. The range may contain negative numbers, for example \fB\-\-nr \-1:\-1\fP means the last partition, and \fB\-\-nr \-2:\-1\fP means the last two partitions. Supported range specifications are:
83 .sp
84 \fIM\fP
85 .RS 4
86 Specifies just one partition (e.g. \fB\-\-nr 3\fP).
87 .RE
88 .sp
89 \fIM\fP\fB:\fP
90 .RS 4
91 Specifies the lower limit only (e.g. \fB\-\-nr 2:\fP).
92 .RE
93 .sp
94 \fB:\fP\fIN\fP
95 .RS 4
96 Specifies the upper limit only (e.g. \fB\-\-nr :4\fP).
97 .RE
98 .sp
99 \fIM\fP\fB:\fP\fIN\fP
100 .RS 4
101 Specifies the lower and upper limits (e.g. \fB\-\-nr 2:4\fP).
102 .RE
103 .RE
104 .sp
105 \fB\-o\fP, \fB\-\-output\fP \fIlist\fP
106 .RS 4
107 Define the output columns to use for \fB\-\-show\fP, \fB\-\-pairs\fP and \fB\-\-raw\fP output. If no output arrangement is specified, then a default set is used. Use \fB\-\-help\fP to get \fIlist\fP of all supported columns. This option cannot be combined with the \fB\-\-add\fP, \fB\-\-delete\fP, \fB\-\-update\fP or \fB\-\-list\fP options.
108 .RE
109 .sp
110 \fB\-\-output\-all\fP
111 .RS 4
112 Output all available columns.
113 .RE
114 .sp
115 \fB\-P\fP, \fB\-\-pairs\fP
116 .RS 4
117 List the partitions using the KEY="value" format.
118 .RE
119 .sp
120 \fB\-r\fP, \fB\-\-raw\fP
121 .RS 4
122 List the partitions using the raw output format.
123 .RE
124 .sp
125 \fB\-s\fP, \fB\-\-show\fP
126 .RS 4
127 List the partitions. The output columns can be selected and rearranged with the \fB\-\-output\fP option. All numbers (except SIZE) are in 512\-byte sectors.
128 .RE
129 .sp
130 \fB\-t\fP, \fB\-\-type\fP \fItype\fP
131 .RS 4
132 Specify the partition table type.
133 .RE
134 .sp
135 \fB\-\-list\-types\fP
136 .RS 4
137 List supported partition types and exit.
138 .RE
139 .sp
140 \fB\-u\fP, \fB\-\-update\fP
141 .RS 4
142 Update the specified partitions.
143 .RE
144 .sp
145 \fB\-S\fP, \fB\-\-sector\-size\fP \fIsize\fP
146 .RS 4
147 Overwrite default sector size.
148 .RE
149 .sp
150 \fB\-v\fP, \fB\-\-verbose\fP
151 .RS 4
152 Verbose mode.
153 .RE
154 .sp
155 \fB\-V\fP, \fB\-\-version\fP
156 .RS 4
157 Display version information and exit.
158 .RE
159 .sp
160 \fB\-h\fP, \fB\-\-help\fP
161 .RS 4
162 Display help text and exit.
163 .RE
164 .SH "ENVIRONMENT"
165 .sp
166 LIBBLKID_DEBUG=all
167 .RS 4
168 enables libblkid debug output.
169 .RE
170 .SH "EXAMPLE"
171 .sp
172 partx \-\-show /dev/sdb3, partx \-\-show \-\-nr 3 /dev/sdb, partx \-\-show /dev/sdb3 /dev/sdb
173 .RS 4
174 All three commands list partition 3 of /dev/sdb.
175 .RE
176 .sp
177 partx \-\-show \- /dev/sdb3
178 .RS 4
179 Lists all subpartitions on \fI/dev/sdb3\fP (the device is used as whole\-disk).
180 .RE
181 .sp
182 partx \-o START \-g \-\-nr 5 /dev/sdb
183 .RS 4
184 Prints the start sector of partition 5 on \fI/dev/sdb\fP without header.
185 .RE
186 .sp
187 partx \-o SECTORS,SIZE /dev/sda5 /dev/sda
188 .RS 4
189 Lists the length in sectors and human\-readable size of partition 5 on \fI/dev/sda\fP.
190 .RE
191 .sp
192 partx \-\-add \-\-nr 3:5 /dev/sdd
193 .RS 4
194 Adds all available partitions from 3 to 5 (inclusive) on \fI/dev/sdd\fP.
195 .RE
196 .sp
197 partx \-d \-\-nr :\-1 /dev/sdd
198 .RS 4
199 Removes the last partition on \fI/dev/sdd\fP.
200 .RE
201 .SH "AUTHORS"
202 .sp
203 .MTO "dave\(atgnu.org" "Davidlohr Bueso" ","
204 .MTO "kzak\(atredhat.com" "Karel Zak" ""
205 .sp
206 The original version was written by \c
207 .MTO "aeb\(atcwi.nl" "Andries E. Brouwer" ""
208 .SH "SEE ALSO"
209 .sp
210 \fBaddpart\fP(8),
211 \fBdelpart\fP(8),
212 \fBfdisk\fP(8),
213 \fBparted\fP(8),
214 \fBpartprobe\fP(8)
215 .SH "REPORTING BUGS"
216 .sp
217 For bug reports, use the issue tracker at \c
218 .URL "https://github.com/karelzak/util\-linux/issues" "" "."
219 .SH "AVAILABILITY"
220 .sp
221 The \fBpartx\fP command is part of the util\-linux package which can be downloaded from \c
222 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."