Linux shell 搜索指定后缀名文件,并复制到指定目录。

1、find /目标目录 -name "*.a" -type f -exec cp {} /目标路径 \;

2、find /usr/local/src -name "*.a" -type f -exec cp {} /backup/libs \;

3、find /目标目录 -name "*.a" -type f -exec cp -p {} /目标路径 \;

4、find /目标目录 -name "*.a" -type f -print0 | xargs -0 cp -t /目标路径

5、find /目标目录 -name "*.a" -type f -exec cp -i {} /目标路径 \;

6、find /目标目录 -name "*.a" -type f -exec cp -u {} /目标路径 \;

远程复制(SCP)

7、find /目标目录 -name "*.a" -type f -exec scp {} user@remote:/目标路径 \;

相关推荐
caimouse8 分钟前
ReactOS 图形系统分析(3):显示驱动 DDI framebuf.dll
linux·运维·网络
IvorySQL25 分钟前
PostgreSQL 日报| RI 快速路径并发读取缺陷(8 月 13 日)
数据库·postgresql
佳児素花痴╮30 分钟前
网络问题与基础理论
运维·服务器·网络
highreport1 小时前
HighReport报表工具定时调度和邮件定时发送
运维·服务器·数据库
01_ice1 小时前
数据库基础
数据库
TonyLee0171 小时前
Claude Code + DeepSeek:服务器安装与使用笔记
linux·服务器·deepseek·claude code
St_rive1 小时前
Pytest skip&&skipif跳过⽤例
运维·服务器·pytest
deepdata_cn1 小时前
向量数据库是非结构化数据的AI检索底座
数据库·人工智能
buhuizhiyuci1 小时前
【Linux 篇】数字世界的水流蓄水池 —— IO 缓冲区机制深度实战解析
linux·运维·服务器·c++
梁辰兴1 小时前
软件工程:数据库设计
数据库·软件工程·数据库设计·逻辑设计·概念设计·梁辰兴·物理设计