This question already has an answer here:
I have a big file about 10G, and i want to delete the first 10 bytes of this file.
If I use
ioutil.ReadFile(), the whole file will be allocated to memory. This can't be done!
Another idea is that I read this file line by line. And after removing the data, I should write the remain data line by line. In this way, the memory can be saved, but if there exists a better way? Like
split the file?