Find files that do not have any owners or do not belong to any user under Linux/UNIX

You can use find command to find out all files that do not have any owners or do not belong to any user under Linux/UNIX/BSD operating systems.

Find file owned by user id 1050 (useful if you deleted user account):

# find / -uid 1050

Find out all files that are not owned by any user:

# find / -nouser

Find out all files that are not owned by any group:

# find / -nogroup

For example in real life on busy clustered hosting server some time we remove 5-10 users and for security reasons you need to find out all files are not owned by any user or group then you can type command:

# find / -nogroup -nouser

See also:

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts