In Linux, is there a way to do a search for files owned by multiple users (or group(s) of users) with the "find" command?

Something like this?

find . -user john, akido 
1

2 Answers

Try using the -o syntax like this:

find ./ -user john -o -user akido 

For further references, check Linux / Unix: Find All The Files Owned By a Particular User / Group

If you want to check the files belonging to users of a specific group:

find ./ -group name_of_group 
5

A file can only be owned by one user.

You can look for groups with

find . -group xxy 

or if you want to find files owned by john or akido

find . '(' -user john -o -user akido ')' ... 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy