最后活跃于 6 months ago

此 Bash 腳本用於強制執行 Logrotate,立即處理系統日誌檔案的輪替,保持日誌管理的有效性。

timmy 修订了这个 Gist 6 months ago. 转到此修订

没有任何变更

timmy 修订了这个 Gist 6 months ago. 转到此修订

1 file changed, 3 insertions

force_logrotate.sh(文件已创建)

@@ -0,0 +1,3 @@
1 + #!/bin/bash
2 + # sudo logrotate -d /etc/logrotate.conf # 只測試,不真的動手
3 + sudo logrotate -f /etc/logrotate.conf # 強制馬上執行一次
上一页 下一页