On Fri, Jul 15, 2016 at 01:43:34PM +0200, Hogren wrote
>    Hello everybody !
> 
> After several strange problems, I discovered that my /tmp content was 
> never deleted.
> 
> Is there a natif mechanism (with fstab or other option) and it's just a 
> misconfiguration or there isn't, and I need to use a systemd service ?
> 
> Thanks for your responses !!

  A cron job is the simplest way.  Have cron run the command...

find /tmp -mtime +9 -execdir rm -rf {} \;

...every day.  "-mtime" (number of days ago the file was last modified)
truncates fractions, so +9 (i.e. greater than 9 days) means *AT LEAST
10 DAYS*.  If you want to delete all old files by all users, including
root, the command would have to be run as root.

-- 
Walter Dnes <[email protected]>
I don't run "desktop environments"; I run useful applications

Reply via email to