prealloc man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

prealloc(2)							   prealloc(2)

NAME
       prealloc - preallocate fast disk storage

SYNOPSIS
DESCRIPTION
       is used to preallocate space on a disk for faster storage operations.

       fildes is a file descriptor obtained from a or system call for an ordi‐
       nary file of zero length.  It must be opened writable, because it  will
       be  written  to by size is the size in bytes to be preallocated for the
       file specified by fildes.  At  least  size  bytes  will	be  allocated.
       Space  is  allocated  in	 an  implementation-dependent fashion for fast
       sequential reads and writes.  The EOF in an extended file  is  left  at
       the  end of the preallocated area.  The current file pointer is left at
       zero.  The file is zero-filled.

       Using on a file does not give the file an attribute that	 is  inherited
       when  copying  or  restoring  the  file using a program such as or (see
       cp(1) and tar(1)).  It simply ensures that disk space has been preallo‐
       cated  for  size	 bytes	in a manner suited for sequential access.  The
       file can be extended beyond these limits by operations past the	origi‐
       nal end of file.	 However, this space will not necessarily be allocated
       using any special strategy.

RETURN VALUE
       Upon successful completion, returns 0; otherwise,  it  returns  −1  and
       sets to indicate the error.

ERRORS
       fails and no disk space is allocated if any of the following conditions
       are encountered:

	      [EBADF]	     fildes is not a valid open file descriptor opened
			     for writing.

	      [EDQUOT]	     User's  disk  quota  block limit has been reached
			     for this file system.

	      [EFBIG]	     size  exceeds  the	 maximum  file	size  or   the
			     process's file size limit.	 See ulimit(2).

	      [ENOSPC]	     Not  enough  space is left on the device to allo‐
			     cate the requested amount;	 no  space  was	 allo‐
			     cated.

	      [ENOTEMPTY]      fildes  not associated with an ordinary file of
			       zero length.

EXAMPLES
       Assuming a process has opened a file for writing, the following call to
       preallocates  at	 least 50000 bytes on disk for the file represented by
       file descriptor outfd:

WARNINGS
       Allocation of the file space is highly dependent on current disk usage.
       A  successful return does not tell you how fragmented the file actually
       might be if the disk is nearing its capacity.

AUTHOR
       was developed by HP.

SEE ALSO
       prealloc(1),  creat(2),	dup(2),	 fcntl(2),   open(2),	prealloc64(2),
       read(2), ulimit(2), write(2).

								   prealloc(2)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net