PREALLOC(1)
NAME
prealloc − preallocate disk storage
SYNOPSIS
prealloc name size
HP-UX COMPATIBILITY
Level: HP-UX/STANDARD
Origin: HP
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.
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.
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 — last mod. May 11, 2021