> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Search ownership of files in Linux
- URL: https://kudithipudi.org/how-to-search-ownership-of-files-in-linux/
- Published: 2011-09-01T14:44:41.000Z
- Updated: 2011-09-01T14:44:41.000Z
- Description: Say you have a directory with a bunch of sub directories and files and you want to see if all the files are owned by a...
- Author: admin
- Tags: HOWTO, Linux, Technology, Uncategorized, #wp, #wp-post, #Import 2026-08-23 02:32

Say you have a directory with a bunch of sub directories and files and you want to see if all the files are owned by a particular user, you can use the following set of commands

```
ls DIRECTORY_PATH -l -R | awk {‘print $3’} | grep -v USER_NAME
```

The set of commands do the following

- ls -l -R shows the list of files and directories
- awk prints the name of the owner of the file (it is the third column)
- grep shows only the lines where the owner name doesn’t match

And yeah.. this works in most variants of Linux :).