精品久久免费视频,国产在线99,欧美伊人久久综合网,99欧美在线,久久伊人成人网,青青国产成人久久激情91麻豆,h黄视频在线观看

linux批量清除tomcat日志 -電腦資料

電腦資料 時(shí)間:2019-01-01 我要投稿
【www.cfdfis.com - 電腦資料】

   

1,直接刪除文件

<code class="hljs lasso">find /tomcat/logs/ -name '*.log.*' | xargs rm -f</code>

2,將文件內(nèi)容清零

<code class="hljs lasso"><code class="hljs lasso">find /tomcat/logs/ -name 'catalina.out' | xargs truncate -s 0</code></code>

    當(dāng)然要是清除一個(gè)文件可以直接echo輸出,

linux批量清除tomcat日志

電腦資料

linux批量清除tomcat日志》(http://www.cfdfis.com)。

<code class="hljs lasso"><code class="hljs lasso"><code class="hljs bash">echo "" > catalina.out</code></code></code>

    但是這個(gè)命令批量處理就不行了,需要用truncate執(zhí)行,將文件字節(jié)數(shù)直接設(shè)置成0。

最新文章