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 flush DNS cache on linux?

DNS is responsible for resolving website names into their respective IPs. Whenever you visit a...

How to Configure VSFTPD with SSL/TLS encrypted connection?

Before you proceed with these steps, ensure that you have installed the VSFTP on your Linux...

How to enable two factor authentication in cPanel?

Please refer to the following steps to enable two-factor authentication in cPanel. Login to...

How to Install Joomla from Softaculous in cPanel?

Joomla is an open-source and a popular CMS. It is a very easy process to build a joomla template....

How to Hide Your NGINX Server Version.

Sometimes hackers target your server with a technic called banner grabbing. Usually, banner...

  • 0 Users Found This Useful

Was this answer helpful?