Hey, I want to find a way to use the tar utility to overwrite to a destination directory.
For example, I have a tar bzip2 here that I extract.
Quote:
tar xvjf archive.tar.bz2 -C newdir
|
And let's say the original root directory of archive.tar.bz2 is called originaldir...
What happens is this directory is created in newdir:
Quote:
/path/to/newdir/originaldir
|
But I want to overwrite all files in newdir with -C newdir:
Newdir should be the same as originaldir, but with newer files clobbering the old, and leaving the original ones alone.
Maybe I can do something after extracting, like rsync -av from originaldir to newdir and removing it, but it seems too wierd. Also, I don't think -O will do what I want, and it's not clear how to use it. Any help?