![](/img/trans.png)
[英]'find' all .log files under a directory, copy them to another directory named after their parent directory?
[英]How to find all file owned by one user and copy them to another directory in RHEL 8?
就像我想找到“user1”擁有的所有文件並將這些文件復制到另一個文件夾“/root/found”。 這在redhat 8中可能嗎?
像這樣使用find
:
find /path/to/source/dir -user 'user1' -exec cp {} /root/found/ \;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.