xref: /titanic_52/usr/src/man/man1m/mkfile.1m (revision e5803b76927480e8f9b67b22201c484ccf4c2bcf)
te
Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
MKFILE 1M "Feb 20, 2008"
NAME
mkfile - create a file
SYNOPSIS

mkfile [-nv] size [g | k | b | m] filename...
DESCRIPTION

mkfile creates one or more files that are suitable for use as NFS-mounted swap areas, or as local swap areas. When a root user executes mkfile(), the sticky bit is set and the file is padded with zeros by default. When non-root users execute mkfile(), they must manually set the sticky bit using chmod(1). The default size is in bytes, but it can be flagged as gigabytes, kilobytes, blocks, or megabytes, with the g, k, b, or m suffixes, respectively.

OPTIONS
-n

Create an empty filename. The size is noted, but disk blocks are not allocated until data is written to them. Files created with this option cannot be swapped over local UFS mounts.

-v

Verbose. Report the names and sizes of created files.

EXIT STATUS

The following exit values are returned: 0

Success.

>0

An error occurred.

USAGE

See largefile(5) for the description of the behavior of mkfile when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Committed
SEE ALSO

chmod(1), swap(1M), attributes(5), largefile(5)