Ivan Petrov thinks this is interesting: Setting File LengthTwo system calls make it possible to adjust the size of a file:#include <unistd.h> #include <sys/types.h> int truncate(const char *path, off_t length); XSI int ftruncate(int fd, off_t length); From 4. Files and File I/O from Linux® Programming by Example by Arnold Robbins Publisher: Prentice Hall Released: April 2004 Note changing file size Share this highlight http://www.safaribooksonline.com/a/linux-programming-by/48732/ Twitter Facebook Google Plus Email Get Instant Access Now Start a Free Trial Have an account? Sign in. Minimise Unlock the rest of Linux® Programming by Example and 30,000 other books and videos By clicking this box, you confirm that you have read and agree to the terms and conditions of our Membership Agreement, and you understand that when your trial period ends, you will be required to provide billing information if you wish to continue using the service. Unlock the rest of this book Start a Free 10-Day Trial loading Learn about Safari for Business Have an account? Sign in.