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 set up Apache password Authentication on Ubuntu 18.08?

On the internet, almost all the applications have some parts which should be protected with a...

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...

What if I exceed the bandwidth limit I am assigned with VPS?

Our system continually monitors the bandwidth usage of all our VPS. In case if your total monthly...

How Do I Point My Websites to VPS?

This article will guide you to point your websites to VPS. You can point your websites to VPS in...

How to Disable SSH Login for the Root User in Linux?

Please refer to the following article to disable root login using SSH in Linux.  Login to your...

  • 0 Users Found This Useful

Was this answer helpful?