Quantcast
Channel: SCN : Unanswered Discussions - SAP NetWeaver Administrator
Viewing all articles
Browse latest Browse all 5164

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 5164

Trending Articles