Users (Owners)
find / -a -user [username]
Owned by user
find / -a ! -user [username]
Not owned by user
find / -a -group [groupname]
Group name
find / -a -user "root:developers"
Owned by root AND belong to developers group
find / -a -user root -o -group root
Owned by root OR belong to root group
find / -a -user1 [username1] -o -user2 [username2]
Multiple owners (username1 OR username2)
find / -a -user "([username1]|[username2])"
Multiple owners (username1 OR username2)
find / -a -nouser -exec ls -l {} \;
No owner
find / -a -nogroup -exec ls -l {} \;
No group
sudo -u [username] find / -user [username]
Executes find
as <username>
Recursively lists file ACLs and filters for entries related to [username]
.
This can be useful for systems using ACLs for finer-grained permissions:
Lists files and directories in [directory]
with detailed information and filters the output for those owned by [username]
.
Note: This method is less reliable and more cumbersome than using find
.
This is more of a last resort option:
Last updated
Was this helpful?