PDA

View Full Version : file size



forumuser06
12-04-2006, 01:05 AM
How do I decrease the file size?

I have increased the file size with
lseek(fd, size, SEEK_SET);
write(fd,"",1);

Now, how would I decrease the same file?

karas
12-04-2006, 02:07 AM
truncate() under libc.