Reputation: 21
I have a huge (500GB) gzipped tar file, and I want to extract all the files in it. The tar file is gzipped, but the files in it are not. The problem is that if I extract them all like this
tar xzf huge.tgz
then I run out of space.
Is there a way to simultaneously extract and gzip the files? I could write a script to do
tar tzf huge.tgz
and then extract each file and gzip it, one after the other. But I was hoping there might be a more efficient solution.
Upvotes: 0
Views: 297
Reputation: 112284
You would have to write a program that uses, for example, libarchive and zlib to extract entries and run them through gzip compression.
Upvotes: 0