Does the OS (CentOS) clear the temporary files automatically and what is the difference between
If the system clears these files automatically, how can I change the TTL ?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
They are different:
/tmp is mounted since boot and cleaned between reboots.
/var/tmp could be unavailable during boot if
/var is a mountpoint. It is not cleaned between reboots.
CentOS 6 has an utility called tmpwatch. It is being executed daily (at the time cron.daily is invoked) from the script called
/etc/cron.daily/tmpwatch. It deletes a file if the atime (last accessed time) is more than 10 days ago.
In CentOS 7 it is different because it uses