I was just fumbling around and am testing this code out now and seems to be working for what I need. Thxz anyways for your help will save it; since other ways are always helpful too, thxz.
Hello all
Does anyone has an intersting script or a good freeware tool for log rotation that is good for Unix and Linux as well ?
My thanks in advance (4 Replies)
I have the below script to help with disk space cleanup that finds logs older than a specified number of days (say 10 days). I need it to grab "active" logs as well. Problem is an "active log" will not get archived unless I put in 0 days which I don't want to do, I need to leave the past 10 days,... (2 Replies)
Hello guys.
I've recently written a basic utilities script just for home use.
and i want to attach a logfile to it that will record all the commands that where executed in that script. Then just so i can add the d%b%y% and make each logfile unique and i can look back in each logfile to see what i... (9 Replies)
Hi,
I'm trying to write a logfile monitor script that reads the logfile and then emails out once there is an error with SQL in. Here is my attempt below which does not work. I'm not much of a scripter as you can probably see but some pointers in the right direction would be much appreciated.
... (3 Replies)
I have application which to the heavy stdout and I have diverted the stdout to log file.
this log file is writing very heavily and we have a script which rotates the logs.
logic for rotation is smthing like
cp logfile logfile.1
cat /dev/null > logfile
this logic was working fine till we... (3 Replies)
Hi,
I would like to implements monitoring tool which looks at the logfile and sends me an email with error messages from the logfile.
The runtime errors are printed in logfile. The logfile also contains some warning and debugging messages.
For errors, the line will start with “Error”., the error... (1 Reply)
Here's the problem.
I have a shell script running for every one minute as cronjob that outputs to a log file. I want to be able to take the data from the log file and insert it into a mysql database. The script needs to run at a set period of time and remove the log file data once the insert is... (7 Replies)
Unix Gurus,
I have a shell script which has few "echo" statements. I am trying to create a logfile where all the outputs of the echo statement sare stored.
I will have to add this as the final step in the existing script so that everytime the script runs, a logfile is generated with all the... (1 Reply)
I have an application that rotate its log once it reaches 100mb and it keeps a total of 24 logs. I am trying to write a script to run daily to tar up the previous day logs files and move them to a different directory. here is a long listing of the logs in the directory:
-rw-r--r-- 1 user1 ... (6 Replies)
Bonjour,
I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things.
The script use the following technique :
tail -fn0 $logfile | \
while read line ; do
... some stuff
done
First one, I'd like a way to end the monitoring script if a... (3 Replies)
Discussion started by: Warluck
3 Replies
LEARN ABOUT BSD
nfprint
NFPRINT(1) General Commands Manual NFPRINT(1)NAME
nfprint - Print the contents of a notesfile
SYNOPSIS
nfprint [ -p ] [ -l# ] [ -d or -nd ] [ -c ] [ -t ] topic [ note-list ]
DESCRIPTION
Nfprint gives the user the ability to print the contents of notesfiles. Nfprint writes to standard output. The text is formatted with
pr(1). When the -c option is used, the output is filtered through cat(1) instead.
The -l# parameter specifies the page length to use (66 lines/page is the default). By specifying -p, the printout is arranged so each base
note starts on a new page. The -d and -nd options specify only notes with the director flag on or off respectively are to be printed. Use
-t to generate a list of titles only; the text of notes and responses is suppressed.
The note list is the set of notes which are to be printed. An example note list is: 1,30-36,13,10,42-50.
FILES
/bin/pr Output filter
/etc/passwd for the users name
/etc/group for the users group(s)
/usr/spool/notes the default notesfile data base
SEE ALSO notes(1), pr(1),
The Notesfile Reference Manual
AUTHORS
Ray Essick (uiucdcs!essick, essick%uiuc@csnet-relay.arpa)
Department of Computer Science
University of Illinois at Urbana-Champaign
Urbana, IL
Rob Kolstad (kolstad@convex.UUCP)
CONVEX Computer Corporation
Richardson, TX
University of Illinois NFPRINT(1)