Re:Remove first 300M lines from 700 GB file on 1TB disk
by bjornedstrom on Tuesday September 22, 2020 @09:52AM
(#24554363)
You win the internet today, that's a fantastic solution.
I think the only gotcha is to handle the last block read in step 1 in case it's not evenly 1 kiB. Otherwise the first read in step 3 will overlap the blocks.
I think the only gotcha is to handle the last block read in step 1 in case it's not evenly 1 kiB. Otherwise the first read in step 3 will overlap the blocks.