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

What is IP forwarding in Linux? How to enable IP forwarding?

IP forwarding helps you to set up the OS to work as a router. You can set IP forwarding when you...

Can I purchase additional RAM, Disk space and Bandwidth for VPS?

Yes, you can purchase additional RAM(Our RAM Recommendation), DiskSpace, Bandwidth and vCPU...

Can I open APN port 2195 on my VPS?

You will get full administrative control of your VPS, therefore you can surely open/close any...

How to Disable SSH Login for the Root User in Linux?

Please refer to the following article to disable root login using SSH in Linux.  Login to your...

Fix cPanel Error -The Email Account Already Exists

Sometimes, you add an email account from cPanel, and you get an error message The Email Account...

  • 0 Users Found This Useful

Was this answer helpful?