Is there any way to set a different target directory structure than the orignial directory structure the tar archive was created from without creating it by hand?
For example, I have many files in a directory structure like this:
Organized by when the file was received. I already create a tar archive without preserving the directory structure above for a whole day's worth of files (I have a small script that loops thru every minute of every hour and appends to a single tar archive). I would like to specify to tar to extract the archive to directory structure like this:
Seems simple enough as I could create the
yyyymmdd directory by hand and just extract my archive into it, but I give this tar archive to a different system (which I have no control over) that relies on this tar archive being extracted to a
yyyymmdd directory and the
yyyy/mm/dd/hh/mm/*.* directory structure gives me performance gains because its organized. Also, I cannot change the original directory structure or waste system resources creating the desired target directory structure before creating the tar archive.
Is there a simple way extract a tar archive under a directory it was never in in the first place?