parlays
asked on
Want to tar/gzip a few files into a specific directory structure?
Hello,
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!!
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!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks everyone!!
Not sure whether you can append a compresed tar archive entry into a Gziped file.