Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a directory with about 300Mb of code and data, and I need to regularly change a few lines of code in a few of the files and repackage the directory into a new project-version.tar.gz. It takes quite a while to repackage all the directory, and I was wondering if there is a way to modify the contents of the few changes done in the existing tar.gz to be able to speed up the process, ideally using a Linux command line.

share|improve this question

1 Answer 1

You can use the -u (--update) (add newer file if it exists) or -r (--append) to add updated files to the archive. However, this will not work for compressed archives. You do not need to untar your archive, but you have to gunzip it first.

Also, -u and -r flags will not delete the older file from the archive, unless you explicitly state it (with --delete).

Side note: I am not exactly sure why you are packaging the source code at all. Maybe you want to use dedicated version control software?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.