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 all files larger than 1GB size in Linux?

If your server is running multiple applications, it could be run out of space at one point. When...

How to Change LiteSpeed WebServer Port on cPanel?

Please refer to the following steps to change the LiteSpeed WebServer Port on cPanel. Login to...

Difference Between su and sudo and How to Configure sudo in Linux VPS.

As we know Linux provides much better security. You can set user management policy and user...

The action Install for product MySQL Server 5.7.19 failed.

You may face this error while installing MySQL 5.7 or upgrading MySQL 5.6 to 5.7. Here, is the...

How can I view my website before DNS changes?

Before DNS propagation takes place, you can browse your website wite temporary URL. Following are...

  • 0 Users Found This Useful

Was this answer helpful?