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 Find Files Modified in Last 30 Days in Linux?

In Linux, we can use the find command in order to search the files across the file system. There...

How to place an order for Linux VPS hosting?

Step-1: First, select your desired Linux VPS Hosting plan with your desired billing cycle...

How to zip/unzip files/folders on Centos?

Zip is a famous archive format and it is used in most operating systems. It is very easy to zip...

How to set Automate Tasks on a Linux VPS Using Cron?

One of our Linux VPS customers faced an issue wherein his Virtual Machine’s system clock was...

How to allow or block the port and IP Address using Firewalld, IP tables, and UFW in Linux?

On Linux, the firewall is essential to control the incoming and outgoing network traffic. It is...

  • 0 Users Found This Useful

Was this answer helpful?