Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-22-2010, 07:10 AM   #16
LQ Newbie
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0


I am posting my solution here. I would like to see a script that actually does this.

#How to extract a tar archive on a disk when booth the archive and 
# extracted data will not fit on the disk at the same time.
# There are situations where one wants to extract a large archive that is 
# already stored on the disk to the same storage. If
# in such a situation booth the large archive and the extracted files will 
# not fit you are in a situation where you can not simply
# extract the archive. 
# The proposed solution here is to first split the archive into smaller 
# chunks and then extracting the archive via stdin while removing the chunks.
# *Note that this is a destructive method*
# First step is to split the archive into chunks. We can not use the 
# "standard" split command because this will keep the original file while 
# creating the chunk. We will be splitting the file in chunks from the end and
#  will truncate the file. This can probably be done using the dd tool.

chunk_size = ( This size should be smaller then the expected free space \
  after removal or the archive and installation of the archive content)

while(file != empty)
        get a chunk_size section from the end
        truncate the file

#after that cat all the files to stdout and pass this to tar
for i in files.chunks
        cat $i
        rm $i
) | tar xvf -


disk, space, tar, untar

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem unzipping/untaring any linux kernel pianom69 Linux - Newbie 4 04-20-2004 12:53 AM
When untaring, where do they go? BaZiL Linux - General 2 09-22-2003 05:22 AM
untaring kernel nacha Slackware 9 07-16-2003 12:02 PM
Problem with Root and untaring/install permissions CragStar Linux From Scratch 1 12-13-2002 07:14 AM
Help with untaring files KevStA Linux - General 3 05-19-2002 12:53 PM

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration