Linux 使用find命令将查到的文件复制到指定的目录中
命令:
find usb[a401]rbm/ -name “*.rbm” -type f -exec cp {} /proj/sbio_alishan_dfx1/to_SOC/RBM/ \;
分析:
路径 – usb[a401]rbm/
名称 – *.rbm
文件类型 – 普通文件
执行 – -exec
命令 – cp {}
指定路径 – /proj/sbio_alishan_dfx1/to_SOC/RBM/
命令结束标识 – \;
另一个中可能会用到的:
find ./ -maxdepth 1 -user weifexie -name “*txt” -type d | xargs rm -rf {}
用于删除自己所有权的文件
– END –