Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我有以下代码用于将所有文件夹复制到新位置:
find /var/CommuniGate/Accounts/ -name 'Archive.folder' | cpio -pdm archiv_mount/
它工作正常,但只复制 Archive.folder。我如何还可以复制 Archive.folder 中包含的所有内容?
使用 find 您可以执行一些命令,例如使用递归复制:
find /var/CommuniGate/Accounts/ -name 'Archive.folder' -exec cp -Rp {} archiv_mount/ \;