Minix Man Pages
home | helpTRUNCATE(2) System Calls Manual TRUNCATE(2) NAME truncate, ftruncate - truncate a file to a specified length (may extend) SYNOPSIS #include <unistd.h> int truncate(char *filename, off_t length); int ftruncate(int fd, off_t length); DESCRIPTION Truncate causes the file filename to be set to the length length causing data after that size to be lost. If the file is set to a length larger than the current file size, the new region can be written to but reads as zeroes. There will be no disk blocks reserved for it. This is a hole. Ftruncate does the same thing as truncate but operates on a file descriptor instead of a filename. SEE ALSO fcntl(2) 4th Berkeley Distribution Feb 13, 2006 TRUNCATE(2)
NAME | SYNOPSIS | DESCRIPTION | SEE ALSO