How to clear /temp



You can use below mentioned commands

find /tmp -size +2M -mtime +2 -exec rm {} \; 
Removes all files greater than 2 MB size that was last modified before 48 hours
Remove Sess files
find . -type f -name "FILE-TO-FIND" -exec rm -f {} \;
find /tmp -type f -name "sess_*" -exec rm -f {} \;

use this along with mtime parameter only or this will never end

1 comment:

Unknown said...

Good info, thanks