Linux 清理日志文件汇总 发表于 2021-04-12 分类于 OS , Shell 阅读次数: 按日期清理要删除超过 10 天的日志文件,可以使用以下命令。 Unix find /path/to/httplogs/ -name "*.log" -type f -mtime +10 -exec rm -f {} \; For Windows Server OS: forfiles /p "C:\path\to\httplogs" /s /m *.log /d -10 /c "cmd /c del @PATH"