On 08/01/18 10:10, mark wrote:
This is among the things we need to do when a user leaves, and it's a larger question than it sounds. Our Office has many servers, with a good number of fileservers for projects, with large filesystems (i.e. 10's of TB). Can anyone think of a way *other* than running what's probably a many-hour long find / -user on all our systems, which is really intensive, to find all the files own by a given user? Locate would be great, but from the man pages and what I can find online, it only stores filenames and paths.
If you want to be rigorous with result (and I for one would), avoid locate: that one is using database which is updated how often? *hmm*, once a week.
find is the only command I will use for the task (and I definitely will use -uid instead of -user, just in case I already deleted user on one of the boxes I look for the user stuff, whereas numeric userid is what is there in file/directory attributes). I also wil look for stuff owned by user's individual group (separate command with -gid argument, as I may want to deal with these differently).
Just my $0.02 Valeri
mark _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx https://lists.centos.org/mailman/listinfo/centos
-- ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++ _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx https://lists.centos.org/mailman/listinfo/centos