|Fun with Unix
||[Dec. 21st, 2006|09:00 am]
What do you do if you have a tarball (Windows users: "zip file") that's taking up
most a lot of the filesystem ("disk space"), not leaving you enough room to uncompress it?
-- cut the archive file into bite-sized chunks (with, say, dd(1)), starting at the back of the file, and calling truncate on the original file as you go backwards. Or maybe you have enough space, so you don't need to truncate. Easier. Then just delete the full-sized archive at the end of your chunking.
-- pipe all the chunks (in foward order!) into tar -zxvf - ("uncompress"), unlinking each chunk as you move on to the next.
Sure, this doens't let you resume later if there's a failure, since you killed your original chunks. But I'm assuming you can get the archive back if you need it.