They are just taking too much disk space, is it safe to delete them?
Is there anything I have to take special care of when I set up a crontab job to do the deletion routinely? Thanks!
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
You would be better off logrotate. You can set it up with a maximum size for each file, and a number of files to maintain. I can then maintain a certain volume of files - eg. 10 files at 10Mb each for a total of 100M. Logrotate is configurable for all files, apache can be configured to manage that itself too.
Stuff in /tmp/ is theoretically removable - but processes relying on them will be upset. eg. MySQL stored the socket file there by default, so other processes using it to connect won't be able to.
You're better off emptying /tmp as part of your reboot process - it should be emptied then automatically.