Hi,
I am writing a shell script that checks catalina logs on a production system and mails me if it detects errors.
It greps the logs for known errors which i have defined as variables.
The problem is the logs are huge, approx 30,000 before they rotate.
So I am forced to use grep instead... (3 Replies)
I have three prodcution box
Prod1
Prod2
Prod3
I want to write a script which tail the log for each production box
and put it into some file which I have want to tail
For example
Prod1
-----
TIMER IXN=MEMPUT, USR=GGu1, elapsed = 0.176 seconds.
11:41:44 AUDIT MEMPUT: member... (4 Replies)
Hi guys...
What am I doing wrong?
#!/bin/sh
LINES=1
FILE=test.log
TAIL="/usr/bin/tail -n"
$TAIL -${LINES} ${FILE}
Error:
./tail.sh
usage: tail ]
tail ]
---------- Post updated at 08:41 AM ---------- Previous update was at 08:32 AM ----------
please ignore this... (3 Replies)
I have file that is being constantly written to
example: file.txt
ABC
EBC
ZZZ
ABC
I am trying to create a simple script that will tail this file and at the same time using tr to change B to F on lines containing 'B'.
I tried this and it doesn't seem to work.
#!/bin/bash
tail -f... (8 Replies)
Hello all,
I am trying to do a tail in a script. But when I quit the tail my script quits also. This is not what I want. I am struggling to get this done.
#!/bin/bash
askFile() {
echo -n "Enter file: "
read FILE
}
doTail() {
tail -F "${1}"
}
askFile
doTail... (4 Replies)
Hi
I have written a script .The script runs properly if i write sql queries .But if i use PLSQL commands of BEGIN if end if , end ,then on running the script the comamds are getting printed on the prompt .
Ex :temp.sql
After connecting to the databse at the sql prompt i type... (1 Reply)
Hi everyone, I'm trying to write a script to format a file using unix2dos. I want to output all but the first 14 lines in a file. Then I want to pipe this to unix2dos to convert the output to a file that's easily readable on windows. Here's what I have:
export Lines=`wc -l < $1`
export... (11 Replies)
my unix machine is currently shared by many teams, because of that lots of processess are running and bad part is taht when I do psu ...i can see all tail processes as well , meaning ppl who have viewed files with tail and have forgotten to close it.
command prompt >> psu
tail -n 0 -f... (2 Replies)
Hi Guys,
I would like to create a script which tails the content of a log file in real time, looks for a specific string , like "ERROR" and captures in a text file the previous 10.000 lines that were existing before this string.
Any help is appreciated. (12 Replies)
I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250.
I would like to join all 250 of them together tail by tail as follows. For example
stat.1000
a b c
d e f
stat.1001
g h i
j k l
So that my output... (2 Replies)
Discussion started by: kayak
2 Replies
LEARN ABOUT DEBIAN
inotail
INOTAIL(1) Inotify enhanced tail INOTAIL(1)NAME
inotail - A fast and lightweight version of tail using inotify
SYNOPSIS
inotail [OPTION]... [FILE]...
DESCRIPTION
inotail is a replacement for the 'tail' program found in the base installation of every Linux/UNIX system. It makes use of the inotify in-
frastructure in recent versions of the Linux kernel to speed up tailing files in the follow mode (the '-f' option). Standard tail polls the
file every second by default while inotail listens to special events sent by the kernel through the inotify API to determine whether a file
needs to be reread. Note: inotail will not work on systems running a kernel without inotify. To enable inotify, please set CONFIG_INOTIFY=y
in your Linux kernel configuration and recompile it.
Currently inotail is not fully compatible to neither POSIX or GNU tail but might be in the future.
OPTIONS -c N, --bytes=N
output the last N bytes. If the first character of N is a '+', begin printing with the Nth character from the start of each file.
-f, --follow
keep the file(s) open and print appended data as the file grows
-n N, --lines=N
output the last N lines (default: 10) If the first character of N is a '+', begin printing with the Nth line from the start of each
file.
-v, --verbose
print headers with file names
-h, --help
show help and exit
-V, --version
show inotail version and exit
AUTHOR
Written by Tobias Klauser <tklauser@distanz.ch>
SEE ALSO tail(1), inotify(7)
2006-08-13 INOTAIL(1)