$100 and a day and a half for shipping is a much better idea than playing russian roulette with work data by adjusting files in-place.
$100 and a day and a half for shipping is a much better idea than playing russian roulette with work data by adjusting files in-place.
That can be avoided if your filesystem supports reflinks / copy_file_range (BTRFS, XFS, OCFS2). Just create a reflink of the file, drop all the blocks at the beginning of the reflink "copy" up to the one containing the line you want to start with using fallocate --collapse-range, and overwrite the remaining data up to the first line with some suitable fill character. For the JSON-encoded lines in this case spaces should work. Total disk space used: one data block for the padding plus some metadata for the reflink. No changes to the original file. No copying or relocating 700 GB of data. Quick, easy, and and safe. But you have to start with the right filesystem for it to work.
I can't imagine unless s/he wants to accidentally lose the data any better alternative.
Even if this works perfectly, you never want to delete data you can't easily retrieve again.
Next Monday the client might change their mind
Ok, $110.
https://www.amazon.com/Seagate-BarraCuda-Internal-Drive-3-5-...
i forgot about not-SSD for a second there.
What would you do when the next time this happens it’s 300B lines from a 1PB file?