LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-12-2010, 02:33 PM   #1
rsiyer
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
untar files only when required


I have to untar some files as part of a build process. Currently I have

Code:
tar xzf <file>.tar.gz
This results in untarring the files for every build, clearly not the best option. Is there a way to extract only delta/updates? This will save time and CPU resource for large files.

I am aware of the tar 'k' flag, but as far as I can tell it only checks if the file exists. Not good enough here.

Thank you

Last edited by rsiyer; 07-12-2010 at 03:21 PM. Reason: Missed a comment
 
Old 07-12-2010, 06:38 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If your definition of "updates" equals "has more recent time stamp" and archive dates are in sync then 'tar -xzf <file>.tar.gz --newer YYYY-MM-DD' (and --newer "YYYY-MM-DD HH:MM:SS") should work?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to untar all tar-files in a directory? zoomzoom Linux - Newbie 13 05-09-2017 11:52 AM
untar a list of tar files? Rotwang Linux - General 6 10-10-2006 01:34 PM
how to untar *.dpkg.md5 files gauri Debian 3 02-17-2006 02:52 AM
untar multiple files redhax8 Linux - Software 2 10-18-2004 01:13 AM
a way to untar multiple files alphisb0t Linux - Software 1 07-05-2004 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration