Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

prealloc(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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

prealloc returns one of the following values upon completion:

0

Successful completion.

1

name already exists and is not an ordinary file of zero length.

2

There is insufficient room on the disk.

3

size exceeds file size limits.

EXAMPLES

The following example preallocates 50000 bytes for the file myfile:

prealloc myfile 50000

WARNINGS

Allocation of file space is highly dependent on 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.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.