]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/mkfs.8
docs: standardize the phrases for --help and --version in all man pages
[thirdparty/util-linux.git] / disk-utils / mkfs.8
CommitLineData
6dbe3af9 1.\" -*- nroff -*-
232dc924 2.TH MKFS 8 "June 2011" "util-linux" "System Administration"
6dbe3af9 3.SH NAME
c181c31d 4mkfs \- build a Linux filesystem
6dbe3af9 5.SH SYNOPSIS
726f69e2 6.B mkfs
449a215f
BS
7.RI [ options ]
8.RB [ \-t
4ec32f6a 9.IR type "] [" fs-options ] " device " [ size ]
6dbe3af9 10.SH DESCRIPTION
726f69e2 11.B mkfs
c181c31d
BS
12is used to build a Linux filesystem on a device, usually
13a hard disk partition. The
14.I device
15argument is either the device name (e.g.
7eda085c 16.IR /dev/hda1 ,
039f3531 17.IR /dev/sdb2 ),
c181c31d 18or a regular file that shall contain the filesystem. The
63ab9524 19.I size
c181c31d 20argument is the number of blocks to be used for the filesystem.
6dbe3af9
KZ
21.PP
22The exit code returned by
726f69e2
KZ
23.B mkfs
24is 0 on success and 1 on failure.
6dbe3af9
KZ
25.PP
26In actuality,
726f69e2 27.B mkfs
c181c31d 28is simply a front-end for the various filesystem builders
039f3531 29(\fBmkfs.\fIfstype\fR)
6dbe3af9 30available under Linux.
c181c31d 31The filesystem-specific builder is searched for in a number
449a215f 32of directories, like perhaps
7eda085c
KZ
33.IR /sbin ,
34.IR /sbin/fs ,
35.IR /sbin/fs.d ,
36.IR /etc/fs ,
37.I /etc
2b6fc908 38(the precise list is defined at compile time but at least
7eda085c
KZ
39contains
40.I /sbin
41and
42.IR /sbin/fs ),
43and finally in the directories
48d7b13a 44listed in the PATH environment variable.
c181c31d 45Please see the filesystem-specific builder manual pages for
6dbe3af9
KZ
46further details.
47.SH OPTIONS
48.TP
449a215f
BS
49.BR \-t , " \-\-type " \fItype\fR
50Specify the \fItype\fR of filesystem to be built.
c181c31d 51If not specified, the default filesystem type
5c36a0eb 52(currently ext2) is used.
6dbe3af9 53.TP
039f3531 54.I fs-options
c181c31d 55Filesystem-specific options to be passed to the real filesystem builder.
6dbe3af9 56Although not guaranteed, the following options are supported
c181c31d 57by most filesystem builders.
6dbe3af9 58.TP
449a215f 59.BR \-V , " \-\-verbose"
c181c31d 60Produce verbose output, including all filesystem-specific commands
63ab9524
SK
61that are executed.
62Specifying this option more than once inhibits execution of any
c181c31d 63filesystem-specific commands.
63ab9524 64This is really only useful for testing.
6dbe3af9 65.TP
449a215f
BS
66.BR \-V , " \-\-version"
67Display version information and exit. (Option \fB\-V\fR will display
c181c31d 68version information only when it is the only parameter, otherwise it
449a215f 69will work as \fB\-\-verbose\fR.)
6dbe3af9 70.TP
449a215f 71.BR \-h , " \-\-help"
b4362b6f 72Display help text and exit.
6dbe3af9
KZ
73.SH BUGS
74All generic options must precede and not be combined with
c181c31d
BS
75filesystem-specific options.
76Some filesystem-specific programs do not support the
77.B -V
6dbe3af9 78(verbose) option, nor return meaningful exit codes.
c181c31d 79Also, some filesystem-specific programs do not automatically
726f69e2 80detect the device size and require the
449a215f 81.I size
726f69e2 82parameter to be specified.
6dbe3af9
KZ
83.SH AUTHORS
84David Engel (david@ods.com)
85.br
86Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
87.br
726f69e2
KZ
88Ron Sommeling (sommel@sci.kun.nl)
89.br
6dbe3af9 90The manual page was shamelessly adapted from Remy Card's version
c181c31d 91for the ext2 filesystem.
6dbe3af9 92.SH SEE ALSO
7eda085c
KZ
93.BR fs (5),
94.BR badblocks (8),
726f69e2 95.BR fsck (8),
7eda085c
KZ
96.BR mkdosfs (8),
97.BR mke2fs (8),
63cccae4 98.BR mkfs.bfs (8),
726f69e2 99.BR mkfs.ext2 (8),
63cccae4 100.BR mkfs.ext3 (8),
26b4e7a5 101.BR mkfs.ext4 (8),
7eda085c
KZ
102.BR mkfs.minix (8),
103.BR mkfs.msdos (8),
63cccae4 104.BR mkfs.vfat (8),
c07ebfa1 105.BR mkfs.xfs (8),
7eda085c 106.BR mkfs.xiafs (8)
86d62711 107.SH AVAILABILITY
601d12fb
KZ
108The mkfs command is part of the util-linux package and is available from
109ftp://ftp.kernel.org/pub/linux/utils/util-linux/.