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 Apply Linux Kernel Security Patches? Manually and Automatically without reboot?

As we know, we do receive Linux kernel updates time and time again and it is essential to update...

How to configure Automatic Updates with yum-cron on CentOS 7?

It is very essential to update your Centos system for the security perspective. Your system may...

How to enable Analytics Feature from cPanel ?

cPanel has launched the Interface Analytics plugin in WHM version 78. cPanel Analytics plugin...

How do I connect to Linux VPS through SSH from Linux and Windows OS?

This article will guide you on how to login to Linux VPS through SSH (Secure Shell) from Linux...

  • 0 Users Found This Useful

Was this answer helpful?