]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/partx.8
login: fix -f description in the man-page
[thirdparty/util-linux.git] / disk-utils / partx.8
index 33fbf3b63549a4cfe797b49e3799bdbcae9a8532..e70d1fae1a8b524d2ac3f00e6c10284903c8f013 100644 (file)
@@ -1,62 +1,99 @@
-.\" partx.8 --
+.\" 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
-.TH PARTX "8" "June 2012" "util-linux" "System Administration"
+.\"
+.TH PARTX "8" "December 2014" "util-linux" "System Administration"
 .SH NAME
-partx \- tell the Linux kernel about the presence and numbering of
-on-disk partitions
+partx \- tell the kernel about the presence and numbering of on-disk partitions
 .SH SYNOPSIS
-partx [\-a|\-d|\-s|\-u] [\-t TYPE] [\-n M:N] [\-] disk
+.B partx
+.RB [ \-a | \-d | \-P | \-r | \-s | \-u ]
+.RB [ \-t " \fItype\fR]"
+.RB [ \-n " \fIM" : \fIN\fR]
+.RB [ \- "] " \fIdisk
 .br
-partx [\-a|\-d|\-s|\-u] [\-t TYPE] partition [disk]
+.B partx
+.RB [ \-a | \-d | \-P | \-r | \-s | \-u ]
+.RB [ \-t " \fItype\fR]"
+.IR partition " [" disk ]
 .SH DESCRIPTION
 Given a device or disk-image,
 .B partx
 tries to parse the partition table and list its contents.  It
-optionally adds or removes partitions.
+can also tell the kernel to add or remove partitions from its
+bookkeeping.
 .PP
 The
 .I disk
 argument is optional when a
 .I 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 "-".  For example:
+(for example to list nested subpartitions), use the argument "\-" (hyphen-minus).
+For example:
 
 .RS 7
 .TP
 partx \-\-show \- /dev/sda3
 .RE
 .PP
-This will see sda3 as a whole-disk rather than a partition.
+This will see sda3 as a whole-disk rather than as a partition.
 .PP
-The
 .B partx is not an fdisk program
-\-\- adding and removing partitions does not change the disk, it just
+\(en 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
-.IP "\fB\-a\fR, \fB\-\-add\fP"
+.TP
+.BR \-a , " \-\-add"
 Add the specified partitions, or read the disk and add all partitions.
-.IP "\fB\-b\fR, \fB\-\-bytes\fP"
+.TP
+.BR \-b , " \-\-bytes"
 Print the SIZE column in bytes rather than in human-readable format.
-.IP "\fB\-d\fR, \fB\-\-delete\fP"
-Delete the specified partitions or all partitions.
-.IP "\fB\-u\fR, \fB\-\-update\fP"
-Update the specified partitions.
-.IP "\fB\-g\fR, \fB\-\-noheadings\fP"
-Do not print a header line.
-.IP "\fB\-h\fR, \fB\-\-help\fP"
-Display help text and exit.
-.IP "\fB\-l\fR, \fB\-\-list\fP"
+.TP
+.BR \-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 \fB\-\-nr\fR ranges without care about the current partitions set on
+the device.
+.TP
+.BR \-g , " \-\-noheadings"
+Do not print a header line with \fB\-\-show\fR or \fB\-\-raw\fR.
+.TP
+.BR \-l , " \-\-list"
 List the partitions.  Note that all numbers are in 512-byte sectors.
 This output format is DEPRECATED in favour of
 .BR \-\-show .
 Do not use it in newly written scripts.
-.IP "\fB\-o\fR, \fB\-\-output \fIlist\fP"
+.TP
+.BR \-n , " \-\-nr " \fIM : \fIN
+Specify the range of partitions.  For backward compatibility also the
+format \fIM\fB\-\fIN\fR is supported.
+The range may contain negative numbers, for example
+.B \-\-nr \-1:\-1
+means the last partition, and
+.B \-\-nr \-2:\-1
+means the last two partitions.  Supported range specifications are:
+.RS 14
+.TP
+.I M
+Specifies just one partition (e.g.\& \fB\-\-nr 3\fR).
+.TP
+.IB M :
+Specifies the lower limit only (e.g.\& \fB\-\-nr 2:\fR).
+.TP
+.BI : N
+Specifies the upper limit only (e.g.\& \fB\-\-nr :4\fR).
+.TP
+.IB M : N
+Specifies the lower and upper limits (e.g.\& \fB\-\-nr 2:4\fR).
+.RE
+.TP
+.BR \-o , " \-\-output " \fIlist
 Define the output columns to use for
-.B \-\-show
+.BR \-\-show ,
+.B \-\-pairs
 and
 .B \-\-raw
 output.  If no output arrangement is specified, then a default set is
@@ -64,71 +101,57 @@ used.  Use
 .B \-\-help
 to get
 .I list
-of all supported columns.  This option cannot be combined with
+of all supported columns.  This option cannot be combined with the
 .BR \-\-add ,
-.B \-\-delete
+.BR \-\-delete ,
+.B \-\-update
 or
 .B \-\-list
 options.
-.IP "\fB\-P\fR, \fB\-\-pairs\fP"
-Output using key="value" format.
-.IP "\fB\-n\fR, \fB\-\-nr \fIM:N\fP"
-Specify the range of partitions.  For backward compatibility also the
-format
-.I M-N
-is supported.  The range may contain negative numbers, for example
-.BI \-\-nr \ :\-1
-means the last partition, and
-.BI \-\-nr \ \-2:\-1
-means the last two partitions.  Supported range specifications are:
-.RS 14
 .TP
-.I M
-Specifies just one partition (e.g. \fB\-\-nr\fR
-.IR 3 ).
+.B \-\-output\-all
+Output all available columns.
 .TP
-.I M:
-Specifies lower limit only (e.g. \fB\-\-nr\fR
-.IR 2: ).
+.BR \-P , " \-\-pairs"
+List the partitions using the KEY="value" format.
 .TP
-.I :N
-Specifies upper limit only (e.g. \fB\-\-nr\fR
-.IR :4 ).
+.BR \-r , " \-\-raw"
+List the partitions using the raw output format.
 .TP
-.IR M:N \ or
-.TQ
-.I M-N
-Specifies lower and upper limits (e.g. \fB--nr\fR
-.IR 2:4 ).
-.RE
-.IP "\fB\-r\fR, \fB\-\-raw\fP"
-Use the raw output format.
-.IP "\fB\-s\fR, \fB\-\-show\fP"
-List the partitions.  All numbers (except SIZE) are in 512-byte
-sectors.  The output columns can be rearranged with the
-.B \-\-output
-option.
-.IP "\fB\-t\fR, \fB\-\-type \fItype\fP"
-Specify the partition table type
-.IR aix ,
-.IR bsd ,
-.IR dos ,
-.IR gpt ,
-.IR mac ,
-.IR minix ,
-.IR sgi ,
-.IR solaris_x86 ,
-.IR sun ,
-.I ultrix
-or
-.IR unixware .
-.IP "\fB\-v\fR, \fB\-\-verbose\fP"
+.BR \-s , " \-\-show"
+List the partitions.
+The output columns can be selected and rearranged with the
+\fB\-\-output\fR option.
+All numbers (except SIZE) are in 512-byte sectors.
+.TP
+.BR \-t , " \-\-type " \fItype
+Specify the partition table type.
+.TP
+.B \-\-list\-types
+List supported partition types and exit.
+.TP
+.BR \-u , " \-\-update"
+Update the specified partitions.
+.TP
+.BR \-S , " \-\-sector\-size " \fIsize
+Overwrite default sector size.
+.TP
+.BR \-v , " \-\-verbose"
 Verbose mode.
-.SH EXAMPLES
+.TP
+.BR \-V , " \-\-version"
+Display version information and exit.
+.TP
+.BR \-h , " \-\-help"
+Display help text and exit.
+.SH ENVIRONMENT
+.IP LIBBLKID_DEBUG=all
+enables libblkid debug output.
+.SH EXAMPLE
 .TP
 partx \-\-show /dev/sdb3
 .TQ
-partx \-\-show --nr 3 /dev/sdb
+partx \-\-show \-\-nr 3 /dev/sdb
 .TQ
 partx \-\-show /dev/sdb3 /dev/sdb
 All three commands list partition 3 of /dev/sdb.
@@ -137,24 +160,18 @@ partx \-\-show \- /dev/sdb3
 Lists all subpartitions on /dev/sdb3 (the device is used as
 whole-disk).
 .TP
-partx \-o START -g --nr 5 /dev/sdb
+partx \-o START \-g \-\-nr 5 /dev/sdb
 Prints the start sector of partition 5 on /dev/sdb without header.
 .TP
 partx \-o SECTORS,SIZE /dev/sda5 /dev/sda
 Lists the length in sectors and human-readable size of partition 5 on
 /dev/sda.
 .TP
-partx \-\-add --nr 3:5 /dev/sdd
+partx \-\-add \-\-nr 3:5 /dev/sdd
 Adds all available partitions from 3 to 5 (inclusive) on /dev/sdd.
 .TP
-partx \-d --nr :-1 /dev/sdd
+partx \-d \-\-nr :\-1 /dev/sdd
 Removes the last partition on /dev/sdd.
-.SH SEE ALSO
-.BR addpart (8),
-.BR delpart (8),
-.BR fdisk (8),
-.BR parted (8),
-.BR partprobe (8)
 .SH AUTHORS
 .MT dave@gnu.org
 Davidlohr Bueso
@@ -166,13 +183,16 @@ Karel Zak
 .PP
 The original version was written by
 .MT aeb@cwi.nl
-Andries E. Brouwer
+Andries E.\& Brouwer
 .ME .
-.SH ENVIRONMENT
-.IP LIBBLKID_DEBUG=0xffff
-enables debug output.
+.SH SEE ALSO
+.BR addpart (8),
+.BR delpart (8),
+.BR fdisk (8),
+.BR parted (8),
+.BR partprobe (8)
 .SH AVAILABILITY
 The partx command is part of the util-linux package and is available from
-.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
+.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
 Linux Kernel Archive
 .UE .