PREALLOC(1) — HP-UX
NAME
prealloc − preallocate disk storage
SYNOPSIS
prealloc name size
DESCRIPTION
Prealloc will preallocate at least size bytes of disk space for an ordinary file name of zero length. It will create the file if it does not already exist. The space will be allocated in an implementation dependent fashion for fast sequential reads and writes for the file.
Prealloc will fail and no disk space will be allocated if name already exists and is not an ordinary file of zero length, if there is not enough space left on disk, or if size exceeds the maximum file size or the process’ file size limit (see ulimit(2)). The EOF is left at the end of the preallocated area. The current file pointer is left at zero. The file is zero-filled.
EXAMPLES
The following example preallocates 50000 bytes for the file myfile:
prealloc myfile 50000
DIAGNOSTICS
Upon successful completion, prealloc exits with a 0 status. Exit status is 1 if name already exists and is not an ordinary file of zero length, 2 if there is not enough room on disk, or 3 if size exceeds file size limits.
AUTHOR
Prealloc was developed by the Hewlett-Packard Company.
SEE ALSO
BUGS
The allocation of the file space is highly dependent on the current disk usage. A successful return does not tell you how fragmented the file actually might be if the disk is reaching its capacity.
Hewlett-Packard Company — Version B.1, May 11, 2021