Written by , Updated on August 16, 2020

In some cases you may required to search all files owned by a particular user on Linux system. For example, you are hosting a cPanel server and there are mismatch with size of quota and home directory of user. In that case some of the files owned by user are outside of there home directory.

To find all files on the server owned by that user run the following command.

find / -user $USERNAME 

Replace $USERNAME with the actual username to whom you need to search files.

This command will search files owned by a particular user in entire file system. So it will take a long time. It is a good idea to store output to a files instead of showing on terminal.

find / -user $USERNAME > user-files.txt

All the files owned by the given username will be stored user-files.txt file.

Find All files Owned by a Specific User in Unix/Linux Linux Commands

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..