ERP,ARP瘦身并如何删除。

Posted zhangshengdong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ERP,ARP瘦身并如何删除。相关的知识,希望对你有一定的参考价值。

ERP,ARP瘦身

场景:由于ARP,ERP运行近10年,日志文件多而杂。清理ERP的日志文件有利于ERP的迁移。

1)ERP的相关日志文件如下:

/ora1159/prod/prodcomn/admin/log/PROD_arpinfo
/ora1159/prod/prodcomn/admin/out/PROD_arpinfo/*.out
/ora1159/prod/prodappl/admin/log/*.req
/ora1159/prod/prodappl/admin/prod/log/*.req
/ora1159/prod/prodcomn/temp 
http log: /ora1159/prod/prodora/iAS/Apache/Apache/logs/

2)清除上述日志的两种方法

  • 第一种删除方法,直接删除目录重建
rm -rf /ora1159/prod/prodcomn/admin/log/PROD_arpinfo
mkdir -p /ora1159/prod/prodcomn/admin/log/PROD_arpinfo
chown -R applprod:dba /ora1159/prod/prodcomn/admin/log/PROD_arpinfo

rm -rf /ora1159/prod/prodcomn/admin/out/PROD_arpinfo
mkdir -p /ora1159/prod/prodcomn/admin/out/PROD_arpinfo
chown -R applprod:dba /ora1159/prod/prodcomn/admin/out/PROD_arpinfo


rm -rf /ora1159/prod/prodappl/admin/prod/log
mkdir -p /ora1159/prod/prodappl/admin/prod/log
chown -R applprod:dba /ora1159/prod/prodappl/admin/prod/log

rm -rf /ora1159/prod/prodcomn/temp
mkdir -p /ora1159/prod/prodcomn/temp
chown -R applprod:dba /ora1159/prod/prodcomn/temp
  • 第二种删除方法,以xargs方式删除//由于碎文件太多
[[email protected] logs]# cd /ora1159/prod/prodora/iAS/Apache/Apache/logs
[[email protected] logs]# ls
[[email protected] logs]# touch 1.txt 2.txt 3.txt
[[email protected] logs]# find /ora1159/prod/prodora/iAS/Apache/Apache/logs/ -type f -name "*" -print0
----------------打印日志全部和在一起--------------------------------
/ora1159/prod/prodora/iAS/Apache/Apache/logs/1.txt/ora1159/prod/prodora/iAS/Apache/Apache/logs/2.txt/ora1159/prod/prodora/iAS/Apache/Apache/logs/3.txt

[[email protected] logs]# find /ora1159/prod/prodora/iAS/Apache/Apache/logs/ -type f -name "*" -print0 | xargs -0
----------------xargs -0将作为定界符。日志的分割--------------------------------- 
/ora1159/prod/prodora/iAS/Apache/Apache/logs/1.txt /ora1159/prod/prodora/iAS/Apache/Apache/logs/2.txt /ora1159/prod/prodora/iAS/Apache/Apache/logs/3.txt

//直接删除日志文件
find /ora1159/prod/prodora/iAS/Apache/Apache/logs/ -type f -name "*" -print0 | xargs -0 rm -f

3)ARP的相关文件并删除。

  • ARP的相关文件
/arp/jboss-4.2.D/server/default/log
/arp/primetongw/jboss-4.0.5/server/default/log
  • ARP的日志文件删除
find /arp/jboss-4.2.D/server/default/log/ -type f -name "*" -print0
find /arp/jboss-4.2.D/server/default/log/ -type f -name "*" -print0 | xargs -0 -n5 rm -f
find /arp/primetongw/jboss-4.0.5/server/default/log -type f -name "*" -print0 | xargs -0 -n5  rm -f

文献参考:http://blog.sina.com.cn/s/blog_769f68db0100ymw7.html

以上是关于ERP,ARP瘦身并如何删除。的主要内容,如果未能解决你的问题,请参考以下文章

Spring Boot部署JAR文件瘦身优化经验分享

iOS ipa包瘦身---删除无用图片资源

从堆栈中弹出特定片段并删除其他片段

一个更好用的.NET Core程序瘦身器,减小程序尺寸到1/3

win7制作GHOST镜像文件太大,如何瘦身?

将片段附加到framelayout时如何删除空格