【问题标题】:How to find all file owned by one user and copy them to another directory in RHEL 8?如何找到一个用户拥有的所有文件并将它们复制到 RHEL 8 中的另一个目录?
【发布时间】:2021-03-26 10:03:12
【问题描述】:

就像我想找到“user1”拥有的所有文件并将这些文件复制到另一个文件夹“/root/found”。这在 redhat 8 中可行吗?

【问题讨论】:

    标签: linux redhat rhel8


    【解决方案1】:

    像这样使用find

    find /path/to/source/dir -user 'user1' -exec cp {} /root/found/ \;
    

    【讨论】:

    • 非常感谢帖木儿先生。
    猜你喜欢
    • 1970-01-01
    • 2020-12-08
    • 2011-08-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多