This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: remoing a user and all their files - not just userdel -r... From: Peter Blomgren <blomgren@monster.stanford.edu> Date: Mon, 24 Jul 2000 20:34:05 -0700 (PDT) Wes, > > How can I get a list of all the files a user owns on my filesystem. I > would need the full path of each file... > To get a list of all files owned by root (uid 0) find / -uid 0 -type f when you're sure the list is sane, pipe to 'xargs rm'. === Subject: Re: remoing a user and all their files - not just userdel -r... From: Wayne Dyer <dwdyer@austin.rr.com> Date: Mon, 24 Jul 2000 22:11:03 -0500 Wes Owen wrote: > How can I get a list of all the files a user owns on my filesystem. I > would need the full path of each file... As root: % cd / % find . -user fred | cut -b 2- > freds_files.txt Find will give you output like: ./home/fred/fredfile.txt Passing it through cut that way will chop off the leading period. Keep in mind that this will list directories, files, links, etc. though. See the -type option (man find) to isolate different types of files. ===