LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-06-2009, 08:46 PM   #1
Arty Ziff
Member
 
Registered: May 2008
Location: Tacoma, WA
Distribution: CentOS and RHEL
Posts: 94

Rep: Reputation: 15
Updating files with a tar ball...


I have a directory that contains some files. Let's call it ./ActiveContent.

I have a tar ball that contains some updated files, let's call it updates.tar.gz.

How do I unpack updates.tar.gz in the directory ./ActiveContent so that files in updates.tar.gz overwrite the identical named files in the directory?
 
Old 02-06-2009, 09:19 PM   #2
rtrahan
Member
 
Registered: Jan 2009
Location: Georgia
Distribution: OpenSuse Fedora
Posts: 64

Rep: Reputation: 17
Unzip Tar

There is no command to direct the files opened to make them overwrite other files nor to open them in a different directory. They are simply compressed files. You could list the files in the tar ball before unpacking it and then remove those files from the ./Active. Then unzip the tarball in the ./Archive directory.

tar tzf myfile.tar.gz (list contents of tar only)
tar xzf myfile.tar.gz (unpack files)
 
Old 02-06-2009, 09:28 PM   #3
Arty Ziff
Member
 
Registered: May 2008
Location: Tacoma, WA
Distribution: CentOS and RHEL
Posts: 94

Original Poster
Rep: Reputation: 15
I'm *very* surprised that there is no tar option that directs the utility to over write existing files wile expanding a tar archive into a directory. It seems like an obvious task. Odd, very odd.
 
Old 02-06-2009, 11:47 PM   #4
Arty Ziff
Member
 
Registered: May 2008
Location: Tacoma, WA
Distribution: CentOS and RHEL
Posts: 94

Original Poster
Rep: Reputation: 15
Solved

Quote:
Originally Posted by rtrahan
There is no command to direct the files opened to make them overwrite other files
Actually, I think:
Code:
tar --overwrite updates.tar.gz
will do it...

Last edited by Arty Ziff; 02-06-2009 at 11:52 PM.
 
  


Reply


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
tar ball locations ThisGuyIKnow Linux - Newbie 3 08-09-2006 10:48 AM
updating tar files rickict Linux - Software 4 07-27-2005 05:44 AM
tar ball uninstall? Xris718 Linux - General 3 09-20-2004 08:55 PM
updating tar files six6 Linux - Software 1 08-21-2004 02:24 PM
compiling a tar ball - needed help please... lpriyamb Linux - Software 3 10-10-2003 04:33 AM


All times are GMT -5. The time now is 04:47 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