Size of log file: 10 GB
Free space in partition: 6 GB
Need to split log file into smaller pieces, and gzip those. But there's not enough room to run something like split(1), which leaves the original file intact. That would leave us with
Original log file: 10 GB
Output of split: another 10 GB
Is there a way to split the file inline, or to do something like this:
$ tail -nnn bigfile.txt > piece.txt
$ some-command -nnn bigfile.txt # just truncate last nnn lines
$ gzip piece.txt
(repeat)
Finding a utility like "some-command" would be ok too.