Clear /tmp when a particular user is occupying files

ARUN Post in DISK RELATED, LINUX COMMANDS
0

When /tmp is full and we cant find a specific pattern to delete the files and when a specific user with username “USERNAME” is occupying the most disk space

find /tmp -user USERNAME  -exec rm -rf {} \;

OR

for i in `find /tmp -user USERNAME`; do rm -f $i;done

OR

find /tmp/ -type f -user USERNAME | xargs rm -f

« Prev: :Next »

Leave a Reply

You must be logged in to post a comment.