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 you can change the ip address of the domain in Webmin control panel?

Following are the steps to change the IP Address of the domain in Webmin control panel. Login...

How to Run Multiple PHP versions with Nginx on Ubuntu?

You can run multiple php versions on Ubuntu without any issue. You require Multiple php versions...

How to Setup NTP Server in CentOS?

NTP enables the automatically sync your system time with a remote server. With the help of NTP...

How to Upgrade PHP Version in cPanel/WHM Server?

Following article will assist you to upgrade PHP version in cPanel/WHM server. This article is...

How to remove files that are more than 100 MB inside the public_html folder in cPanel server ?

Please run the below command to find out the files that are more than 100 MB inside your cPanel...

  • 0 Users Found This Useful

Was this answer helpful?