truncate - truncate a file to a specified length
#include <unistd.h> int truncate(const char *path, off_t length);
Refer to ftruncate().