Please check the manual page truncate(2).