10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
As i am working in unix environment so i have an logs that is created by my application at the following location that is
/opt/app/glac/current/servers/ops/logs
inside the logs directory there are different kinds of logs(that is the file having extension as .log ) have been created... (1 Reply)
Discussion started by: 2015nks
1 Replies
2. Shell Programming and Scripting
Hi All,
I am new to the scripting and using solaris 10 OS. Please suggest me from the below script which modifications need to be done to delete the files more that 2days older. Current script is deleting existing file.
# Remove old explorer runs if needed
DIR=`dirname ${EXP_TARGET}`
if ... (2 Replies)
Discussion started by: Navkreddy
2 Replies
3. Shell Programming and Scripting
i am using HP-UX OS......
delete logs older than 60 days
find -mtime +60 | grep -i '.*log' | xargs rm
-mtime is nt available in HP-UX, pls tell me other option ? (2 Replies)
Discussion started by: only4satish
2 Replies
4. Shell Programming and Scripting
Hi All,
I have a requirement to fetch logs of last 'N' days.
I am trying the following command which is working fine if it finds the date of that day in logfile.
START=`TZ="GMT+$((24*N))" date +"%Y %b %d"`
this is being used to fetch 'N'th day's date
and
awk '/'"$START"'/{p=1}... (24 Replies)
Discussion started by: KDMishra
24 Replies
5. Shell Programming and Scripting
I want to write a shell script that deletes all log files in a directory that are older than 30 days except for 3 files:
I am using the following command:
find /tmp/logs -name "*.log" -mtime +30 -exec rm -f {} \;But this command deletes all the log files.
How can i modify this script that... (5 Replies)
Discussion started by: mmunir
5 Replies
6. UNIX for Dummies Questions & Answers
Hi
Can u please tell me how to delete last 10 days logs .. (9 Replies)
Discussion started by: pb18798
9 Replies
7. Solaris
Hi
I Need To Remove Logs Older Than April 1 St(4/1/2007) By Date
I Have A Script To Remove 3 Months Old Like Using 90 Days
Thanks (3 Replies)
Discussion started by: cvdev
3 Replies
8. UNIX for Advanced & Expert Users
My code is
tar -cvf logs.tar `find /usr/openv/logs/512*.log -mtime +2` && find *.log* -mtime +2 -exec rm {} \;
this gives me output as:
tar: Missing filenames:confused: (1 Reply)
Discussion started by: timus1980
1 Replies
9. Shell Programming and Scripting
currently i am doing a project where in i am creating files everyday with a name xyz_date for e.g. xyz_20071010,xyz_20071011 ... in this fashion.so at a particular point of time i need only 31 days of data.suppose we are executing the code today then we will have only 31 days data present and... (7 Replies)
Discussion started by: dr46014
7 Replies
10. Shell Programming and Scripting
hi all,
i would like to write the shell script to remove the out-dated log
my log file name will be like this:
access_20050101.log
access_20050102.log
.
.
.
access_20071007.log
access_20071008.log
access_20071009.log
i has try to write the command as following, it will be remove the... (2 Replies)
Discussion started by: eric_wong_ch
2 Replies