复制文件夹(仅复制 python 个文件,不复制其余文件)

Copy Folder (only copy the python files, but not the rest)

如何在保持结构的同时复制文件夹(仅其 python 文件)?我如何在命令行中执行此操作?

find . -name '*.py' -exec cp --parents \{\} /target \;

来源:https://unix.stackexchange.com/questions/83593/copy-specific-file-type-keeping-the-folder-structure