|Skip Navigation Links|
|Exit Print View|
|man pages section 1M: System Administration Commands Oracle Solaris 11.1 Information Library|
- create a file
mkfile [-nv] size [t | g | k | b | m] filename...
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 terabytes, gigabytes, kilobytes, blocks, or megabytes, with the t, g, k, b, or m suffixes, respectively. Suffixes can be uppercase or lowercase.
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.
Verbose. Report the names and sizes of created files.
The following exit values are returned:
An error occurred.
See largefile(5) for the description of the behavior of mkfile when encountering files greater than or equal to 2 Gbyte ( 231 bytes).
See attributes(5) for descriptions of the following attributes: