How to delete N bytes from the starting of the file from a C function???

Hi,
I want to delete the initial few lines (or even bytes) from a file.
I want to do this from a C function & this is in Linux platform.
The truncate & ftruncate is allowing me to delete bytes from the end only.
Any linux C function calls or ideas or any suggestions??

I'm in a dead lock..Plz help

Wishes
Jay

I even tried

lseek(fd, (off_t)numOfBytes, SEEK_SET);
i=ftruncate(fd,1000);

but this didn't help

No, there is no function to delete from the middle of a file, only to truncate.

You have two options

(a) open one file, read buffer fulls and write earlier in the file until you get to the end then truncate

(b) open a new file, copy the data you want to keep to the new file and then close it and rename it onto the original.