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 flush DNS cache on linux?

DNS is responsible for resolving website names into their respective IPs. Whenever you visit a...

How to Install Joomla from Softaculous in cPanel?

Joomla is an open-source and a popular CMS. It is a very easy process to build a joomla template....

How to change the MySQL timeout limit in Linux?

Please refer to the following article to change the MySQL timeout error.  Log in to your...

How to enable Analytics Feature from cPanel ?

cPanel has launched the Interface Analytics plugin in WHM version 78. cPanel Analytics plugin...

How to change SSH port on Ubuntu?

Please refer to the following steps to change the SSH port in Ubuntu. Login to your server via...

  • 0 Users Found This Useful

Was this answer helpful?