How to find files by owner?

To find files by owner using the find command, you can use the -user option followed by the username of the owner. Here’s the syntax:

find /path/to/directory -user username

Example

If you want to find all files owned by the user labex in the directory /home/labex/project, you would use:

find /home/labex/project -user labex

This command will list all files and directories within /home/labex/project that are owned by the user labex.

0 Comments

no data
Be the first to share your comment!