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 delete mailman archives on cPanel using command?

If you have created a mailman mailing list called [email protected] and want to clear it, then...

How to Install Java on Ubuntu 18.04 ?

Java is a programming language developed by Sun Microsystems. There are lots of applications and...

How To Install PIP in Linux?

PIP called a Package management system for Python. It allows your system to install and manage...

How to install Mongodb in CentOS?

MongoDB is a Free and open-source cross-platform document-oriented database program. Classified...

How to install Virtualmin/Webmin control panel in CentOS 7?

Please refer to the following steps to install Virtualmin/Webmin on Centos 7.x Let us update...

  • 0 Users Found This Useful

Was this answer helpful?