StudyingUnixInterface/4/fileDirectory/trunc.c
2020-12-07 12:17:01 +08:00

10 lines
163 B
C

#include <unistd.h>
#include <stdio.h>
int main(void){
if(truncate("./test/test1", 256) < 0) {
printf("truncate error for file test1\n");
}
return 0;
}