Let's say I am in
/tmp. I want to tar
/tmp/bbb/222. The command I use is:
tar -vczf /tmp/my.tar.gz /tmp/aaa/123 /tmp/bbb/222. This command works fine.
However, when I use
tar -zxvf my.tar.gzto decompress the tar file, it gives me 2 file(let's say I copied my.tar.gz to a path called pwd and now I am in pwd): pwd/tmp/aaa/123 and pwd/tmp/bbb/222. The result I expect is pwd/my/123 and pwd/my/222.
Are there any commands I can use to achieve that?