I have a vendor log file that repeatedly grows to hundreds of gigabytes in size. I've reported the bug a few times without resolution. Are there any issues with symbolic linking the file in question to /dev/null
? System is a current generation iMac running latest system.
I understand I'll lose any logs in those files but with 200Gb of repeated copyright notices I'm OK with that until they eventually find the cause of the bug.
The most obvious issue with symlinking it to
/dev/null
would be that you would then be unable to read its contents.If you do not need to read the contents of the log file, then there is no problem symlinking to
/dev/null
- although you may want to look into the ability to simply disable the logging facility of the software in question in the first place.Additionally, if you do in fact need to read the contents of the log file, I recommend that you deploy something to rotate the logs (such as newsyslog for Mac OS X) and have it rotate the logs at regular intervals and/or after they reach a certain (defined) size.
It's all ok if you dont want them. No worry there.
I did that tip on a xenserver, as by default the install partition is done small by the installer, thus the filesystem was hitting 90%+ of usage. (even with logrotation or log compression added)