gpt4 book ai didi

unix - 如何在unix中移动或复制 'find'命令列出的文件?

转载 作者:行者123 更新时间:2023-12-03 07:06:42 24 4
gpt4 key购买 nike

我有使用下面的命令看到的某些文件的列表,但如何将列出的这些文件复制到另一个文件夹(例如 ~/test)中?

find . -mtime 1 -exec du -hc {} +

最佳答案

添加到 Eric Jablow 的答案中,这是一个可能的解决方案(它对我有用 - linux mint 14/nadia)

find /path/to/search/ -type f -name "glob-to-find-files" | xargs cp -t /target/path/

您也可以引用“How can I use xargs to copy files that have spaces and quotes in their names? ”。

关于unix - 如何在unix中移动或复制 'find'命令列出的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17368872/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com