I often stick temporary files that I'm working on in /tmp, so I don't have to delete them once I'm done. However, if the computer crashes, then I'm out of luck, because that directory will be wiped.
Is there a way to prevent /tmp being wiped if the computer is restarting from a crash? If not, is there another solution, such as creating another temporary directory elsewhere and have it automatically deleted on restart if there is no crash.
/etc/default/rcSand changing$TMPTIMEto 1. Thank you anyway! – Sparhawk Dec 29 '12 at 09:46tmpreaper. Another option would be to put the files into/var/tmp, which does not get wiped on boot, then clean it out regularly withtmpreaper. – Sparhawk Dec 29 '12 at 09:53/etc/default/rcSto scan/proc/cmdlineto look for atmptime=Nparameter and setTMPTIMEaccordingly. Now if I need to keep this work on boot, I simple set the boot optiontmptime=2say. OK, I still loose non-auotsaved stuff in RAM, but at least this problem is solved. – TerryE Oct 27 '13 at 10:43