Locating files owned by a particular user
Posted on 2011-03-12
I have been trying to delete files that are owned by a particular user in a linux machine. Please verify if my logic is correct.
Firstly I search for all files owned by a user :
find / -user bob
and then pass the rm -rf command to that expression using the exec command
Question 1. Will the find option used above find all files owned by user bob?
Question2. Am I correct in parsing the rm -rf command using the exec option?
Any feedback is highly appreciated.