WebMar 21, 2024 · By using ls -l, Linux can find the owner of a file. To find a file that belongs to a specific user or a specific group, use the -user and -group options, respectively. The -l option displays Unix / Linux / BSD file types, permissions, number of hard links, owner, group, size, date, and file name. Web1. Find the files owned by user kelly, and copy them to a catalog: /opt/dir. # cd (into /path to copy files) e.g. cd /opt/ # mkdir dir (where you want to copy the files) # find / -user kelly -exec cp -rfp {} /opt/dir/ \; Share. Improve this answer.
linux - How to find all file owned by one user and copy them to …
WebDec 15, 2024 · Like I want to find all file owned by "user1" and copy those file to another folder "/root/found". Is this possible in redhat 8? linux redhat rhel8 Share Improve this question Follow asked Dec 15, 2024 at 18:17 Muktadir Kafee 3 1 Add a comment 1 Answer Sorted by: 0 Use find like so: find /path/to/source/dir -user 'user1' -exec cp {} /root/found/ \; WebApr 12, 2024 · Start with: find /path/to/file -user user1 -perm -u+rwx. This means: look for files starting in /path/to/files, owned by user1, where the permissions for group and other can be anything ( - in front of the permission string) and the users permissions are only: rwx. To search for files only (no directories) then add -type f. Also, try some reading. atlantic supermarket lena
Find All files Owned by a Specific User in Unix/Linux
WebJul 3, 2009 · Use the find command as follows to find all files owned by a user called tom, in /home (open terminal and type the command): Advertisement find / home -user tom find / home -user jerry To find all files in the /sales directory owned by the vip group, enter: find / sales -group vip WebNov 19, 2024 · To find files owned by a particular user or group, use the -user and -group options. For example, to search for all files and directories owned by the user linuxize, you would run: find / -user linuxize Here is a real-world example. WebDec 28, 2014 · Here is how you could determine to allow or deny access to a particular process: You first determine who owns the process and which pts device started it by using: $ ps -p -F tty=,user= pts/X . Then you check the owner of the pts/X device, like this: $ ls -l /dev/pts/X crw--w--w- 1 21, 0 Apr 18 13:27 … pisarka helena