How to Find Files Owned by Users(s) in Linux

bash arguments, pass parameter, pass argument to script

The find command in Linux/Unix is extremely powerful and can take some time to learn all of its uses. In previous articles, we have explained how to it to find files greater than or less than a certain size, find number of files in a folder, and finding the largest files on your computer. This article will explain how to use it to find all files/folders owned by one or many users.

Find files by user bill

find -type f . -user bill

Find folders/directories by user bill

find -type d . -user bill

Find files by users bill and tom

find -type f . -user bill -o -user tom

Find folders/directories by user bill and tom

find -type d . -user bill -o user tom

These examples should get you started, let me know if you need any further assistance!

See also  The Ultimate Linux Guide: File Management, Security, and Troubleshooting
Photo of author
As Editor in Chief of HeatWare.net, Sood draws on over 20 years in Software Engineering to offer helpful tutorials and tips for MySQL, PostgreSQL, PHP, and everyday OS issues. Backed by hands-on work and real code examples, Sood breaks down Windows, macOS, and Linux so both beginners and power-users can learn valuable insights.

Leave a Comment