Is there a way to remove the first few bytes of a file (truncating it from the front) without using programs like tail or without having to read the whole contents of the file?
That is because the file size might be hundreds of MBs or even GBs, so dealing with reading and re-writing the contents of the file would be very unefficient.
What I am looking for is, possibly, a solution that allows me to offset the beginning of the file (in the file allocation table) so that the first few bytes are just skipped.
On Windows there is a SetEndOfFile
function, which allows me to truncate the file simply by limiting the end of the file, reducing the file size.
Is there anything like a StartOfFile
function which would allow me to make the file start a few bytes after its current start position?
Any other solution would also be welcome, as long as it does not require reading / rewriting the whole contents of the file.