Thanks again everyone.
I think I got it, but I stil have one last question. Here's what I have done, it can also act as a small howto for others who have this problem: - Made a shell script called cleartmp.sh : Quote:
- Created a symbolic link in /etc/init.d/rc5.d: Quote:
|
jlliagre why the never do that comment?
|
Quote:
Code:
*/120 * * * * root cd /tmp;rm * 2) "cd /tmp" return value is not checked, if for some (unlikely and odd) reason, /tmp doesn't exists at the moment the command is run, the rm will remove everything in the user's home directory (unless the shell quit after the failed cd, not sure if bash does that). 3) the rm command doesn't check if the files it is going to remove are in use, and even if it would, that wouldn't be enough as even usused files can be expected to stay for an ongoing process that will open it later. This rm command would only be safe in a quiet system, with all services and applications stopped, ideally in single user mode. |
All times are GMT -5. The time now is 05:59 AM. |