How can I tail a zipped file without reading its entire contents?

前端 未结 7 1365
温柔的废话
温柔的废话 2020-12-15 15:35

I want to emulate the functionality of gzcat | tail -n.

This would be helpful for times when there are huge files (of a few GB\'s or so). Can I tail the last few li

7条回答
  •  囚心锁ツ
    2020-12-15 15:55

    If you have control over what goes into the file in the first place, if it's anything like a ZIP file you could store chunks of predetermined size with filenames in increasing numerical order and then just decompress the last chunk/file.

提交回复
热议问题