cd /tmp
find /tmp/ -type f -user nivedha | xargs rm -f
Find a delete all the files owned by a user
Find a delete all the files owned by a user
Here we will see how to delete all the files owned by a user named "nivedha" from the /tmp folder
Arun
WebhostingDevelopment.com
WebhostingDevelopment.com
Re: Find a delete all the files owned by a user
Another method is
cd /tmp
Code: Select all
for i in `find /tmp -user ncuysoog`; do rm -f $i; done
Arun
WebhostingDevelopment.com
WebhostingDevelopment.com