LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

Rep: Reputation: 0

Hello

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

Code:
#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)
do
        get a chunk_size section from the end
        truncate the file
done

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


Reply

Tags
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 07:31 AM.

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