Linux 定時清理nginx方法及腳本

前提:nginx裝在linux的,linux 安裝了cron 背景:nginx日誌會逐步累積,定期清理需求 編寫.sh腳本,其中clearNginxLog.sh是清理腳本,我把它放在了nginx安裝目錄下 backupdir=/usr/local/nginx/logs truncate -s 0 $backupdir/error.log truncate -s 0 $backupdir/acces
相關文章
相關標籤/搜索