LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   search files and directories' owner (https://www.linuxquestions.org/questions/linux-newbie-8/search-files-and-directories-owner-884454/)

windstory 06-03-2011 11:53 PM

search files and directories' owner
 
My system is centos 5.5, and I need nobody:nobody's directories and files under data.

There is a directory named "data, and this directory has so many directories and files generated by web program. Most of them is nobody:nobody.

I want to to make a list of these nobody:nobody directories ans files.

Is it possible to make a list of these directories and files?

Rearden888 06-04-2011 12:18 AM

Use the find command, there are switches available for -user and -group

Something like "find /data -user nobody"

You can also limit the depth if you want.

Also, you might find it useful to dump the output to a file using something like:
"find /data -user nobody > ~/file-list.txt" so you can look at it later, since it will dump a really long list.


All times are GMT -5. The time now is 11:51 AM.