10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Guys,
Can you please help me with a script which zips the older log files(1-2 weeks) and delete them?
I want to run the script manually instead of setting it up in a cron job.
Appreciate your help.
Regards,
Kris (6 Replies)
Discussion started by: kriss.gv
6 Replies
2. 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
3. UNIX for Advanced & Expert Users
Hello Experts,
For the following sample log, can you tell me how I can sort it or group it by thread number. To be specific, I just want to group them together so that its easy to analyize.
Thanks.
2012-08-17 00:00:06,369 INFO ExecuteThread: '33' for queue:... (2 Replies)
Discussion started by: samjna
2 Replies
4. 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
5. 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
6. Shell Programming and Scripting
Hi Friends
I have a file called processLog.txt file
processLog.txt
---------------
echo "line starts "$LINE
suppCode=${LINE:0:3}
#gatewayArchive=`scp root@mrp-gateway:/usr/local/apache/data/PLAT/MIMUS/upload/PROD/archive/112042708173000.txt /home/krishnaveni/scripts/tempFolder`
#echo... (5 Replies)
Discussion started by: kittusri9
5 Replies
7. 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
8. Shell Programming and Scripting
I have to write a shell script like this--
1) Utility will be run under the directory owner.
2) This utility will clean files in ABC/logs. And following logs will be backed up or deleted.
Dispatcher Logs
Middle tier Logs
Sage log
Sage monitor log
Sage db clean up result log
Core files ... (12 Replies)
Discussion started by: namishtiwari
12 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to setup a cronjob that will delete logs every 2 hours. I have script that delete logs per day. but logging is too big and i want to run a conjob that will delete every 2 hours.
this is my current command but it deletes on a per day basis.
find . -name "*.log*" -o -name... (3 Replies)
Discussion started by: tungaw2004
3 Replies
10. Shell Programming and Scripting
Hello All,
We have a directory where we have old archived logs. They are numbered <logfile>.log.1 till <logfile>.log.100 or more. I just want to keep 10 log files and delete others through the script.
Please advise.
Thanks,
Chiru (4 Replies)
Discussion started by: chiru_h
4 Replies