Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Catalina.out log slicing script

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Root@ydweb04 rzqg] # cat rzqg.sh #! / bin/bashlog_path=/data/tomcat/logsd= `date +% Ymury% d`d4 = `date-dong10 day ago' +% Ymury% mmury% d`cd ${log_path} & & cp catalina.out $log_path/cron/catalina.out.$d.logecho > catalina.outrm-rf $log_path/cron/catalina.out.$ {d4} .logfind $log_path-maxdepth 1-type f-mtime + 10-delete

Cut the log and copy it to the specified directory

Keep a log for up to 10 days

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report