📅  最后修改于: 2022-03-11 14:51:11.988000             🧑  作者: Mango
rsync -a -m --include='*.jpg' --include='*/' --exclude='*' src_directory/ dst_directory/
--include='*.jpg' - First we are including all .jpg files.
--include='*/' - Then we are including all directories inside the in src_directory directory. Without this rsync will only copy *.jpg files in the top level directory.
-m - Removes the empty directories