I'm trying to copy files with specific attachments to a different directory with their relative paths preserved. From the original top path I am calling:
cp --parents `find . -name \*.pdf -print` /new_path/
I believe this works; however only if the file found has no spaces in the name.
I also tried:
cp --parents `find . -name \*.pdf -print0` /new_path/
This doesn't work obviously because without the new line character cp receives the wrong name.
Is it possible to surround the find result with quotes ?