How to Find All Files Owned by a Specific User in Unix/Linux?

You might receive an issue where you require to find all the files that are owned by a specific user.  Run the below command to find all files on the server owned by the specific users.

find / -user $USERNAME 

You need to replace $USERNAME with the exact username for which you want to search the files. However, the above command may take some time to find out the files in the entire file system. You can run the below command that will store the output in a file called users_file.txt. Files owned by the entered username will be stored in a users_files.txt file.

find / -user $USERNAME > users_files.txt

Related Articles

How to add IP address in Ubuntu using command?

Sometimes you may require to add the IP Address manually in ubuntu network Interface. Following...

How to Install NodeBB on a CentOS VPS?

NodeBB is an open source and powerful forum software based on the Node.js. It is very easy to...

How to Enable Extended Logging in Exim?

Extended Exim log is helpful in troubleshooting Exim issues on Linux Server. It allows you to add...

How to install Git on Centos7?

Git is a famous version-control system. Git is used to tracking the changes made on your code as...

How to Kill a Process Running on Specific Port in Linux?

First of all, we will need to identify the Process ID which runs on any port. Once we find the...

  • 0 Users Found This Useful

Was this answer helpful?