Premise
- I have a directory
/foo/bar
- I have a tar file containing the directory
baz
Problem
Extracting the contents of baz
in the archive to /foo/bar
Example
The archive contains:
baz/ file1.txt
The source directory contains:
foo/ bar/ file2.txt
After extraction I want it to be:
foo/ bar/ file1.txt file2.txt
Solutions so far
Extract to a temporary directory and then move the contents of baz
to the target location, this works since I the baz
directory will always have the same name.
Any other ideas?