chsize man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     CHSIZE(S)		      XENIX System V		     CHSIZE(S)

     Name
	  chsize - Changes the size of a file.

     Syntax
	  int chsize (fildes, size)
	  int fildes;
	  long size;

     Description
	  fildes is a file descriptor obtained from a creat, open,
	  dup, fcntl, or pipe system call.  chsize changes the size of
	  the file associated with the file descriptor fildes to be
	  exactly size bytes in length.	 The routine either truncates
	  the file, or pads it with an appropriate number of bytes.
	  If size is less than the initial size of the file, then all
	  allocated disk blocks between size and the initial file size
	  are freed.

	  The maximum file size as set by ulimit(S) is enforced when
	  chsize is called, rather than on subsequent writes.  Thus
	  chsize fails, and the file size remains unchanged if the new
	  changed file size would exceed the ulimit.

     Return Value
	  Upon successful completion, a value of 0 is returned.
	  Otherwise, the value -1 is returned and errno is set to
	  indicate the error.

     See Also
	  creat(S), dup(S), lseek(S), open(S), pipe(S), ulimit(S)

     Notes
	  In general if chsize is used to expand the size of a file,
	  when data is written to the end of the file, intervening
	  blocks are filled with zeros. In a few rare cases, reducing
	  the file size may not remove the data beyond the new end-
	  of-file.  This routine must be linked with the linker option
	  -lx.

     Page 1					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

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