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 Install EPEL Repo on CentOS and RHEL 7?

EPEL stands for Extra Packages for Enterprise Linux. It is very easy to install additional...

How to check Various cPanel logs like WHM, Apache, MySQL, Email, Error etc?

You can use cPanel to access your Linux hosting account with GUI. It is relatively easier to work...

What are the benefits of CloudLinux?

There are numerous advantages and benefits of CloudLinux OS and we will discuss it in this...

How to install Virtualmin / Webmin control panel in Ubuntu 18.04?

Please refer to the following steps to install Webmin/Virtualmin on Ubuntu 18.04 Let's run the...

How to set File Upload Size limit in Apache?

As we know Apache is an open-source and free web server. Here, we will configure apache to set...

  • 0 Users Found This Useful

Was this answer helpful?