Reputation: 3907
I want to perform the following command in a compressed file (.bz2). I typed the following:
awk '{print $1}' input.txt.bz2 > output.txt
But the result is: Killed. How can I extract portion of the compressed text file I have without decompress it as it is extremely large file and I do not have enough space?
Upvotes: 2
Views: 3887
Reputation: 798546
You must decompress it. You don't need to decompress it to disk.
bzcat input.txt.bz2 | awk '{print $1}' > output.txt
Upvotes: 5