简体   繁体   English

如何查找一个用户拥有的所有文件并将它们复制到 RHEL 8 中的另一个目录?

[英]How to find all file owned by one user and copy them to another directory in RHEL 8?

Like I want to find all file owned by "user1" and copy those file to another folder "/root/found".就像我想找到“user1”拥有的所有文件并将这些文件复制到另一个文件夹“/root/found”。 Is this possible in redhat 8?这在redhat 8中可能吗?

Use find like so:像这样使用find

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “查找”目录下的所有.log文件,将它们复制到以其父目录命名的另一个目录? - 'find' all .log files under a directory, copy them to another directory named after their parent directory? 如何按文件类型递归查找文件并将它们复制到目录? - How to find files recursively by file type and copy them to a directory? 找到一个文件并将其复制到另一个目录 - find a file and copy it to another directory 在Linux的目录中查找所有user1所有和user1的组可执行文件 - Find all user1 owned and user1's group executable files in the directory in Linux 查找所有扩展名为.sh .cpp .c的文件,并将其复制到我的桌面目录中,如果存在同名文件,则将其重命名 - find all files with .sh .cpp .c extension and copy them to a directory in my desktop, if there is a file with the same name, rename it 如何在列表中查找包含使用部分名称的目录和子目录中的所有文件,然后将它们复制到新文件夹 - How to find all files in a directory and subdirectories that contain using partial names within a list then copy them to a new folder 如何控制所有文件扩展名或不控制另一个目录? 仅在一行中 - How to control all file extensions or not another directory? in just one line 限制用户使用aix中oracle拥有的一个现有目录 - restrict user to use one existing directory owned by oracle in aix 如何复制包含特定字符的所有字符串,并将它们传递到另一个文件中 - how to copy all strings that contain a specific character , and past them in another file 如何使用Android中的本机代码将文件从一个目录复制到另一个目录? - How to copy file from one directory to another using native code in Android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM