Linux – Log file size limit

cronlinuxlog-filesloggingUbuntu

I have a script which runs every 5 minutes by cron, with >> path/logfile.log appended to store the output. Let's say I have this script running several years; do I have to worry about this file getting to big, i.e. do I have to manually shorten it down regularly?

Best Answer

do I have to worry about this file getting to big,

Well, assuming you've not invented an infinite storage device, then yes this is something good to think about.

i.e. do I have to manually shorten it down regularly?

Look into logrotate, which is a standard method of maintaining log files that ships with every distribution.

Related Topic