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 Visual Studio Code on CentOS 7?

Visual Studio Code is a Microsoft Product and an open-source cross-platform code editor. It...

How to Install MySQL on CentOS 7.x?

MySQL is one of the popular database management systems. For now, MySQL is no longer within...

How to List All Files Ordered by Size in Linux?

In Linux, we can list all the files using the ls command. Here, we will share some commands which...

How to Install NodeBB on a CentOS VPS?

NodeBB is an open source and powerful forum software based on the Node.js. It is very easy to...

On which platform Linux VPS are configured?

We configure Linux VPS on XEN virtualization technique. However, Linux Cloud VPS are configured...

  • 0 Users Found This Useful

Was this answer helpful?