ftruncate could help ?