Quantcast
Channel: SCN : All Content - SAP NetWeaver Administrator
Viewing all articles
Browse latest Browse all 5139

Script for deleting old .nmon files .

$
0
0

Hi,

 

Few day back i asked a question regarding delete old log file(old .nmon files) .

 

I basically tried to come with a script which is perfect for my problem .

 

This is my script

 

#!/bin/sh
###
### Static variables
###
nmon_dir
="/var/log/applog/nmon"
cd $nmon_dir
find $nmon_dir
-xdev -type f -mtime +360-name "*.nmon*"-exec rm {} \;
find $nmon_dir
-xdev -type f -mtime +300-name "*.nmon"-exec gzip {} \;

 

I could delete the files as i wanted but that I am not sure whether it compressed those file . Because I couldn't find .gz file both in root or /var/log/applog/nmon path .

Need Help!



Viewing all articles
Browse latest Browse all 5139

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>