Adding timestamp to a filename with mv in BASH

前端 未结 6 1754
孤城傲影
孤城傲影 2020-12-07 15:43

Well, I\'m a linux newbie, and I\'m having an issue with a simple bash script.

I\'ve got a program that adds to a log file while it\'s running. Over time that log fi

6条回答
  •  爱一瞬间的悲伤
    2020-12-07 16:07

    Well, it's not a direct answer to your question, but there's a tool in GNU/Linux whose job is to rotate log files on regular basis, keeping old ones zipped up to a certain limit. It's logrotate

提交回复
热议问题