On Wed, Dec 11, 2013 at 8:09 PM, Antoine D hercule.wikipedia@gmail.com wrote:
I delete them because jsub always append new logs. To delete them I have added a rm job in my crontab
So change that to truncate instead of rm?
you can either:
$ > filename $ cp /dev/null filename
Both will truncate the file. (no leading $, that's just your prompt)
also, you can use logrotate! :) (probably already installed. see `man logrotate`, https://en.wikipedia.org/wiki/Log_rotation, etc. logrotate can do truncation, make sure the new file after a move has the right perms, run arbitrary commands before/after, etc.)
-Jeremy