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 fix - Apache Error: No matching DirectoryIndex?

You may face the below error while accessing applications that have index files other than...

How to block an IP address using .htaccess?

You can block traffic coming from any specific IP addresses with .htaaccess file. Please refer to...

How to fix su USER Fails With "su: cannot create child process: Resource temporarily unavailable" Error in CloudLinux?

You may face the below error while switching the accounts using su command. su accutest su:...

How to install Google Chrome on Ubuntu 18.04 using the Command Line?

Following are the steps to install Google Chrome using Command-Line. Edit the source.list file...

Can I upgrade my VPS plan without losing any data or settings?

Yes, you can upgrade your existing VPS to higher plan anytime. Your data will remain intact. We...

  • 0 Users Found This Useful

Was this answer helpful?