Sponsored Content
Full Discussion: Clean old log files
Top Forums Shell Programming and Scripting Clean old log files Post 302339288 by pludi on Thursday 30th of July 2009 07:24:02 AM
Old 07-30-2009
Take a look at find with the mtime option, or check out logrotate (should be available with all major distros)
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Clean an LV out of the ODM

I recently had a disk crash and was not able to clean the dump lv off the disk. Now trying to create new lvdump I am running into errors. My question is how do I remove the old lv out of the ODM? I have tried going through smit and also just rmlv and it cannot find the lv. Yet when I run lslv on... (0 Replies)
Discussion started by: Wamland
0 Replies

2. UNIX for Dummies Questions & Answers

Help me clean this up

UNIX amature/novice. I've written a script (it works) that needs to be cleaned up. I'm searching for a way to perform a "go to , perform this then return" section of code. The books I have and searches i"ve done so far do not show me how to do this. I've pasted in the current code below. I've... (1 Reply)
Discussion started by: scanner248
1 Replies

3. AIX

How to clean PV id?

When I run command: >chdev -l hdisk1 -a pv=clear It shows Method error (/etc/methods/chgdisk): 0514-062 Cannot perform the requested function because the specified device is busy. run: #>fuser -kxuc /dev/raw1 /dev/raw1: How to clean PV id? (4 Replies)
Discussion started by: rainbow_bean
4 Replies

4. Shell Programming and Scripting

noob question - is awk the tool to clean dirty text files?

Hi, nevermind. I think I've found the answer. It appears I was looking for index, match, sub, and gsub. I want to write a shell script that will clean the html out of a bunch of files and format the data for import into excel. Awk seems like a powerful tool, but it seems oriented to... (1 Reply)
Discussion started by: yogert909
1 Replies

5. Solaris

to clean unnecessary files and folders

I want to clean used solaris OS and then to give another developer. How can I understand that difference between system file/folder and others. I want to delete apart from the files/folders. I need tools or scripts like disk-cleanup or something like that. #usr>du -s -h * 6.6M 4lib ... (1 Reply)
Discussion started by: getrue
1 Replies

6. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

7. Shell Programming and Scripting

Clean up the space

Hi I just want to clean up the space in UNIX. Is there any special command that does this process or do I need to manually type the following rm <filename> Any help would be really appreciated. Thanks (2 Replies)
Discussion started by: bobby1015
2 Replies

8. Shell Programming and Scripting

How to clean 3 days before files, from a directory?

I have a Solaris System. I am using bash shell. I want to prepare a script which can do the below. There are few directories i need to clean. In those directories, I need to delete files which are older than 3 days. 3 days before files need to be deleted. The directories are as follows.... (7 Replies)
Discussion started by: Saidul
7 Replies

9. Shell Programming and Scripting

Redirecting log files to null writing junk into log files

Redirecting log files to null writing junk into log files. i have log files which created from below command exec <processname> >$logfile but when it reaches some size i am redirecting to null while process is running like >$logfile manually but after that it writes some junk into... (7 Replies)
Discussion started by: greenworld123
7 Replies

10. UNIX for Beginners Questions & Answers

UNIX Script to clean files

Hello All, I need a script that would delete files which are more than "X" number of days old, also if there can be a log file of the deleted files for reference. I am from windows background hence finding it difficult. Any help is much appreciated Regards Wert (4 Replies)
Discussion started by: wert468
4 Replies
SCANLOGS(8)						      System Manager's Manual						       SCANLOGS(8)

NAME
       scanlogs - summarize INN log files.

SYNOPSIS
       scanlogs [ norotate ] [ nonn ]

DESCRIPTION
       Scanlogs  summarizes  the information recorded in the INN log files (see newslog(5)).  By default, it also rotates and cleans out the logs.
       It is normally invoked by the news.daily(8) script.

KEYWORDS
       The following keywords are accepted:

       norotate
	      Using this keyword disables the rotating and cleaning aspect of the log processing: the logs files are only scanned for  information
	      and no contents are altered.

       nonn   Normally the nn log file is scanned and rotated.	Using this keyword disables this function.

       If scanlogs is invoked more than once a day, the ``norotate'' keyword should be used to prevent premature log cleaning.

HISTORY
       Written by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews.  This is revision 1.1, dated 1996/10/29.

SEE ALSO
       innd(8) newslog(5), news.daily(8), nnrpd(8).

																       SCANLOGS(8)
All times are GMT -4. The time now is 11:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy