Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .