Here is my problem:
I have folder called archive that contains many subdirectories and files in the following format:
/home/user/archive/$YYYY/$MM/$DD
I would like to copy some specific files to /tmp while keeping part of the directory tree.
So far, I have come up with
find /home/user/archive -mtime +1 -type f -exec cp --parents {} /tmp;
(the find ... -mtime +1 -type f part actually returns what I want to copy)
However, the output is in format /tmp/home/user/archive/$YYYY/$MM/$DD
whereas my desired output format is /tmp/archive/$YYYY/$MM/$DD
Any solutions? :)