Cleaning out temporary files in Debian and Ubuntu with tmpreaper

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Perl

How about this oneliner?

perl -MFile::Find -e 'finddepth(sub{$_ eq "."&&return;lstat&&(-d _?rmdir:unlink)},"/tmp")'

Syndicate content