I have several images that I want to tar or gzip into specific directories. For instance:
image1.png => my_images/image1.png
image2.png => thumbnail/image2.png
So basically I want to specify when creating the archive, "put these files in this directory in the archive and these files in another directory".
That is the first part of the question. The second part is while uncompressing I want to also specify a different destination for all the files depending on the directory they are in. If the second part is not possible I can uncompress them all and then just run copy commands for each specific file.
I'm doing this in PHP but I probably will end up calling a shell script to all of it. Thanks for any help or advice!!