'\" te .\" Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. .TH mkfile 1M "11 Feb 2015" "SunOS 5.11" "System Administration Commands" .SH NAME mkfile \- create a file .SH SYNOPSIS .LP .nf \fBmkfile\fR [\fB-nv\fR] \fIsize\fR [t | g | k | b | m] \fIfilename\fR... .fi .SH DESCRIPTION .sp .LP \fBmkfile\fR creates one or more files of the specified size that are padded with zeros by default. The default \fBsize\fR is in bytes, but it can be flagged as terabytes, gigabytes, kilobytes, blocks, or megabytes, with the \fBt\fR, \fBg\fR, \fBk\fR, \fBb\fR, or \fBm\fR suffixes, respectively. Suffixes can be uppercase or lowercase. .sp .LP If an administrator wishes to use a file created with mkfile as a swap file, they must first set the sticky bit using \fBchmod\fR(1). .SH OPTIONS .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 6n .rt Create an empty \fIfilename\fR. The size is noted, but disk blocks are not allocated until data is written to them. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .RS 6n .rt Verbose. Report the names and sizes of created files. .RE .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt Success. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt An error occurred. .RE .SH USAGE .sp .LP See \fBlargefile\fR(5) for the description of the behavior of \fBmkfile\fR when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes). .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBchmod\fR(1), \fBswap\fR(1M), \fBattributes\fR(5), \fBlargefile\fR(5)