[英]How to copy certain files from remote to local?
I can copy all files with extension .ds from a subdirectory "folder" to my local using: 我可以使用以下命令将所有扩展名为.ds的文件从子目录“文件夹”复制到本地:
scp -r name@host:/data/folder/*.ds /pathtodestination/
However, there are lots of subdirectories under data
and I want to copy all/only files with .ds from all subdirectories under data
to my local. 但是,
data
下有很多子目录,我想将所有/仅带有.ds的文件从data
下的所有子目录复制到本地。
Is there a way to do this? 有没有办法做到这一点?
You may need to try this 您可能需要尝试一下
scp -r name@host:/data/**/*.ds /pathtodestination/
OR 要么
find <start directory> -iname "<all my files type>" -exec cp {} <target_dir> \;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.