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

Fix :: SSH Error: Starting sshd: Missing privilege separation directory: /var/empty/sshd

Problem Statement Could not connect to Linux machine through SSH. Error Message While starting...

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...

bash: netstat: command not found.

You may face the below error on your Linux OS if you haven’t installed the netstat command...

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...

How to setup VSFTPD on CentOS 7.x?

VSFTPD is an FTP server for Unix/Linux systems. It is a default FTP server on CentOS, RHEL Linux...

  • 0 Users Found This Useful

Was this answer helpful?