I have a large gz file (11 GB) that I can't decompress to my computer with even 100GB free. I've extracted the first 50 GB with the command:
gzip -cd file.gz | dd ibs=1024 count=50000000 > first_50_GB_file.txt
I was able to successfully parse my data from this portion of the file. Now I want to extract the other portion of the file to parse. I've tried to extract the last n lines from the file and then to decompress that as follows:
tail -50 file.gz > last_part_of_file.gz
I hoped that afterwards, I could use:
gzip -cd last_part_of_file.gz | dd ibs=1024 count=50000000 > last_50_GB_file.txt
but the tail command is taking >10 minutes for a test of only 50 lines.
If anyone has any solutions on how to extract (potentially arbitrary) portions of a .gz file that do not include the beginning I would be very grateful.