≡ Menu

Linux: Find User Files

How do I find out all files owned by a user called tom or jerry under UNIX / Linux / BSD / OS X operating systems?

Use the find command as follows to find all files owned by a user called tom, in /home (open terminal and type the command):

find /home -user tom
find /home -user jerry

To find all files in the /sales directory owned by the vip group, enter:

 find /sales -group vip

You can restrict your search to *.c (all c files only) for user tom as follows:

find /home -user tom -type f -name "*.c"

You can restrict your search to directories only as follows:

find /home -user tom -type d


  • -type d – Find only directories.
  • -type f – Find only files.
  • -name “*.c” – Find all file ending with .c extension.
Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 2 comments… add one }
  • Miguel August 24, 2012, 7:04 pm

    Excelent! just what i’ve been looking for :)

  • Abraham January 13, 2014, 12:35 pm

    Thanks a lot :)

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , ,