Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

prealloc(2)

ulimit(2)

PREALLOC(1)  —  HP-UX

NAME

prealloc − preallocate disk storage

SYNOPSIS

prealloc name size

DESCRIPTION

Prealloc preallocates at least size bytes of disk space for an ordinary file name, creating the file if name does not already exist.  The space is allocated in an implementation-dependent fashion for fast sequential reads and writes of the file. 

Prealloc fails and no disk space is allocated if name already exists and is not an ordinary file of zero length, if insufficient space is left on disk, or if size exceeds the maximum file size or the file size limit of the process (see ulimit(2)).  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 insufficient room on the disk, or 3 if size exceeds file size limits. 

EXAMPLES

The following example preallocates 50000 bytes for the file myfile:

prealloc myfile 50000

WARNINGS

The allocation of the file space is highly dependent on the current disk usage.  A successful return does not indicate how fragmented the file actually might be if the disk is approaching its capacity. 

AUTHOR

Prealloc was developed by HP. 

SEE ALSO

prealloc(2), ulimit(2). 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026