Project

General

Profile

Feature #794

Updated by Daniel Curtis almost 8 years ago

I recently needed to track down every file owned by a user on a Linux machine. Fortunately the find command already has a parameter to limit matches to a user or group. 

 This works on Linux, BSD, and OSX. 

 * Find all files in the root directory owned by the *www-data* user: 
 <pre> 
 find / -user www-data 
 </pre> 

 * Find all @.php@ files in the *www-data* group in the @/usr/local/www@ directory: 
 <pre> 
 find /usr/local/www -group www-data -name "*.php" 
 </pre> 

 h2. Resources 

 * http://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/

Back