diff options
Diffstat (limited to '')
-rw-r--r-- | disk-utils/partx.8 | 228 | ||||
-rw-r--r-- | disk-utils/partx.8.adoc | 149 |
2 files changed, 377 insertions, 0 deletions
diff --git a/disk-utils/partx.8 b/disk-utils/partx.8 new file mode 100644 index 0000000..3362ff8 --- /dev/null +++ b/disk-utils/partx.8 @@ -0,0 +1,228 @@ +'\" t +.\" Title: partx +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-05-11 +.\" Manual: System Administration +.\" Source: util-linux 2.38.1 +.\" Language: English +.\" +.TH "PARTX" "8" "2022-05-11" "util\-linux 2.38.1" "System Administration" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +partx \- tell the kernel about the presence and numbering of on\-disk partitions +.SH "SYNOPSIS" +.sp +\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 +.sp +\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] +.SH "DESCRIPTION" +.sp +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. +.sp +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: +.RS 3 +.ll -.6i +.sp +partx \-\-show \- /dev/sda3 +.br +.RE +.ll +.sp +This will see sda3 as a whole\-disk rather than as a partition. +.sp +\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. +.SH "OPTIONS" +.sp +\fB\-a\fP, \fB\-\-add\fP +.RS 4 +Add the specified partitions, or read the disk and add all partitions. +.RE +.sp +\fB\-b\fP, \fB\-\-bytes\fP +.RS 4 +Print the sizes in bytes rather than in a human\-readable format. +.sp +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. +.RE +.sp +\fB\-d\fP, \fB\-\-delete\fP +.RS 4 +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. +.RE +.sp +\fB\-g\fP, \fB\-\-noheadings\fP +.RS 4 +Do not print a header line with \fB\-\-show\fP or \fB\-\-raw\fP. +.RE +.sp +\fB\-l\fP, \fB\-\-list\fP +.RS 4 +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. +.RE +.sp +\fB\-n\fP, \fB\-\-nr\fP \fIM\fP\fB:\fP\fIN\fP +.RS 4 +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: +.sp +\fIM\fP +.RS 4 +Specifies just one partition (e.g. \fB\-\-nr 3\fP). +.RE +.sp +\fIM\fP\fB:\fP +.RS 4 +Specifies the lower limit only (e.g. \fB\-\-nr 2:\fP). +.RE +.sp +\fB:\fP\fIN\fP +.RS 4 +Specifies the upper limit only (e.g. \fB\-\-nr :4\fP). +.RE +.sp +\fIM\fP\fB:\fP\fIN\fP +.RS 4 +Specifies the lower and upper limits (e.g. \fB\-\-nr 2:4\fP). +.RE +.RE +.sp +\fB\-o\fP, \fB\-\-output\fP \fIlist\fP +.RS 4 +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. +.RE +.sp +\fB\-\-output\-all\fP +.RS 4 +Output all available columns. +.RE +.sp +\fB\-P\fP, \fB\-\-pairs\fP +.RS 4 +List the partitions using the KEY="value" format. +.RE +.sp +\fB\-r\fP, \fB\-\-raw\fP +.RS 4 +List the partitions using the raw output format. +.RE +.sp +\fB\-s\fP, \fB\-\-show\fP +.RS 4 +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. +.RE +.sp +\fB\-t\fP, \fB\-\-type\fP \fItype\fP +.RS 4 +Specify the partition table type. +.RE +.sp +\fB\-\-list\-types\fP +.RS 4 +List supported partition types and exit. +.RE +.sp +\fB\-u\fP, \fB\-\-update\fP +.RS 4 +Update the specified partitions. +.RE +.sp +\fB\-S\fP, \fB\-\-sector\-size\fP \fIsize\fP +.RS 4 +Overwrite default sector size. +.RE +.sp +\fB\-v\fP, \fB\-\-verbose\fP +.RS 4 +Verbose mode. +.RE +.sp +\fB\-h\fP, \fB\-\-help\fP +.RS 4 +Display help text and exit. +.RE +.sp +\fB\-V\fP, \fB\-\-version\fP +.RS 4 +Print version and exit. +.RE +.SH "ENVIRONMENT" +.sp +LIBBLKID_DEBUG=all +.RS 4 +enables libblkid debug output. +.RE +.SH "EXAMPLE" +.sp +partx \-\-show /dev/sdb3, partx \-\-show \-\-nr 3 /dev/sdb, partx \-\-show /dev/sdb3 /dev/sdb +.RS 4 +All three commands list partition 3 of \fI/dev/sdb\fP. +.RE +.sp +partx \-\-show \- /dev/sdb3 +.RS 4 +Lists all subpartitions on \fI/dev/sdb3\fP (the device is used as whole\-disk). +.RE +.sp +partx \-o START \-g \-\-nr 5 /dev/sdb +.RS 4 +Prints the start sector of partition 5 on \fI/dev/sdb\fP without header. +.RE +.sp +partx \-o SECTORS,SIZE /dev/sda5 /dev/sda +.RS 4 +Lists the length in sectors and human\-readable size of partition 5 on \fI/dev/sda\fP. +.RE +.sp +partx \-\-add \-\-nr 3:5 /dev/sdd +.RS 4 +Adds all available partitions from 3 to 5 (inclusive) on \fI/dev/sdd\fP. +.RE +.sp +partx \-d \-\-nr :\-1 /dev/sdd +.RS 4 +Removes the last partition on \fI/dev/sdd\fP. +.RE +.SH "AUTHORS" +.sp +.MTO "dave\(atgnu.org" "Davidlohr Bueso" "," +.MTO "kzak\(atredhat.com" "Karel Zak" "" +.sp +The original version was written by \c +.MTO "aeb\(atcwi.nl" "Andries E. Brouwer" "" +.SH "SEE ALSO" +.sp +\fBaddpart\fP(8), +\fBdelpart\fP(8), +\fBfdisk\fP(8), +\fBparted\fP(8), +\fBpartprobe\fP(8) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/util\-linux/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBpartx\fP command is part of the util\-linux package which can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."
\ No newline at end of file diff --git a/disk-utils/partx.8.adoc b/disk-utils/partx.8.adoc new file mode 100644 index 0000000..bfc0c5a --- /dev/null +++ b/disk-utils/partx.8.adoc @@ -0,0 +1,149 @@ +//po4a: entry man manual +//// +partx.8 -- man page for partx +Copyright 2007 Karel Zak <kzak@redhat.com> +Copyright 2007 Red Hat, Inc. +Copyright 2010 Davidlohr Bueso <dave@gnu.org> +May be distributed under the GNU General Public License +//// += partx(8) +:doctype: manpage +:man manual: System Administration +:man source: util-linux {release-version} +:page-layout: base +:command: partx + +== 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*:: +Add the specified partitions, or read the disk and add all partitions. + +*-b*, *--bytes*:: +include::man-common/in-bytes.adoc[] + +*-d*, *--delete*:: +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. + +*-g*, *--noheadings*:: +Do not print a header line with *--show* or *--raw*. + +*-l*, *--list*:: +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. + +*-n*, *--nr* __M__**:**_N_:: +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: ++ +_M_;; +Specifies just one partition (e.g. *--nr 3*). +__M__**:**;; +Specifies the lower limit only (e.g. *--nr 2:*). +**:**__N__;; +Specifies the upper limit only (e.g. *--nr :4*). +__M__**:**_N_;; +Specifies the lower and upper limits (e.g. *--nr 2:4*). + +*-o*, *--output* _list_:: +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. + +*--output-all*:: +Output all available columns. + +*-P*, *--pairs*:: +List the partitions using the KEY="value" format. + +*-r*, *--raw*:: +List the partitions using the raw output format. + +*-s*, *--show*:: +List the partitions. The output columns can be selected and rearranged with the *--output* option. All numbers (except SIZE) are in 512-byte sectors. + +*-t*, *--type* _type_:: +Specify the partition table type. + +*--list-types*:: +List supported partition types and exit. + +*-u*, *--update*:: +Update the specified partitions. + +*-S*, *--sector-size* _size_:: +Overwrite default sector size. + +*-v*, *--verbose*:: +Verbose mode. + +include::man-common/help-version.adoc[] + +== ENVIRONMENT + +LIBBLKID_DEBUG=all:: +enables libblkid debug output. + +== EXAMPLE + +partx --show /dev/sdb3:: +partx --show --nr 3 /dev/sdb:: +partx --show /dev/sdb3 /dev/sdb:: +All three commands list partition 3 of _/dev/sdb_. + +partx --show - /dev/sdb3:: +Lists all subpartitions on _/dev/sdb3_ (the device is used as whole-disk). + +partx -o START -g --nr 5 /dev/sdb:: +Prints the start sector of partition 5 on _/dev/sdb_ without header. + +partx -o SECTORS,SIZE /dev/sda5 /dev/sda:: +Lists the length in sectors and human-readable size of partition 5 on _/dev/sda_. + +partx --add --nr 3:5 /dev/sdd:: +Adds all available partitions from 3 to 5 (inclusive) on _/dev/sdd_. + +partx -d --nr :-1 /dev/sdd:: +Removes the last partition on _/dev/sdd_. + +== AUTHORS + +mailto:dave@gnu.org[Davidlohr Bueso], +mailto:kzak@redhat.com[Karel Zak] + +The original version was written by mailto:aeb@cwi.nl[Andries E. Brouwer] + +== SEE ALSO + +*addpart*(8), +*delpart*(8), +*fdisk*(8), +*parted*(8), +*partprobe*(8) + +include::man-common/bugreports.adoc[] + +include::man-common/footer.adoc[] + +ifdef::translation[] +include::man-common/translation.adoc[] +endif::[] |