Problems figuring out how to move files and also keeping the same dir structure

I’m having problems with the mv command in terminal.
Basically what I want to do is similar to a copy but only a certain file type and keeping the same directory structure.

AFAIK there is no way to directly “move” the files, you’d need to “copy” them, then “delete” them from the source.

So lets say you wanna copy all “.pdf” files:

find /path/to/source/directory -name '*.pdf' -xtype f -exec cp -v --parents -t /path/to/destination/directory {} +

then once you’re sure you have them all in the target directory, you COULD delete the originals from the source directory

find /path/to/source/directory -name '*.pdf' -xtype f -exec rm -v {} +

but instead I’d suggest you install trash-cli

sudo apt-get install trash-cli

then instead of DELETING them from the source directory, instead TRASH them:

find /path/to/source/directory -name '*.pdf' -xtype f -exec trash {} +

you’ll now find them in the trash, so you can recover them if necessary.

Does that put them in one single directory or nested as I’d prefer it to be nested.

Or another way I could do it would be to make a complete copy and then delete all but what I want, which is the zip & 7z files.

nested … it preserves directory structure (as requested).