Operating System - HP-UX
1753781 Members
7444 Online
108799 Solutions
New Discussion юеВ

Simple command to list all files/dir owned by a group

 
SOLVED
Go to solution
Walt Watson
Advisor

Simple command to list all files/dir owned by a group

getaccess is OK for files in a directory - is there any simple way to recursively execute this to list all files and directories along with access rights for a group ownership?

Example, I need to get a list of all directories and files with goup owner = {adm} onthe system { } = selected group right.
4 REPLIES 4
Ivan Ferreira
Honored Contributor
Solution

Re: Simple command to list all files/dir owned by a group

find / -type f -group
find / -type d -group
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: Simple command to list all files/dir owned by a group

I forgot to add the -perm option.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
James R. Ferguson
Acclaimed Contributor

Re: Simple command to list all files/dir owned by a group

Hi Walt:

To add to Ivan's answer, should you want to find all files and directories *not* belonging to any group, do:

# find /path -nogroup

...similarly for files and directories lacking a mapping 'uid':

# find /path -nouser

Regards!

...JRF...
Walt Watson
Advisor

Re: Simple command to list all files/dir owned by a group

perfect! forgot about find...thanks!