Centos – Delete original tar after untar? Not enough space to untar

centostar

I have a 130GB tar file I need to untar to /storage.

Problem is, I don't have enough disk space for both to exist at the same time. How can I untar the tar file, and ensure there is enough disk space, and delete the file immediately after untar?

Thanks.

Best Answer

This one is hard. It really depends on how much free space you have.

Others said to extract part of the files and delete them from the tar. That's the only option I can see right now.

Updating the tar requires the tar to be reconstructed without the deleted files on the same drive. That's why you have to have 2 x tar size + something more to allow extraction of the files.

HTH