Cleaning out temporary files in Debian and Ubuntu with tmpreaper
2010, October 13 - 10:30 — müzso
The easiest (and probably the most secure) way to do this is to install the tmpreaper package and change a few configuration lines in /etc/tmpreaper.conf.
Comments
Perl
perl -MFile::Find -e 'finddepth(sub{$_ eq "."&&return;lstat&&(-d _?rmdir:unlink)},"/tmp")'