Commit 064d459d authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 0.1

parents
This diff is collapsed.
Since has only been tested under linux/i386. Other systems which
use the same types in the fields returned by stat(2) should
be able to use since without porting. Otherwise you might
have to hack things.
Installation instructions: Su to root and type:
make install
Will compile the since binary and add the following files to
your system:
/usr/local/bin/since
/usr/local/man/man1/since.1
###########################################################################
# Compiler and Flags ######################################################
CC = gcc
CFLAGS = -Wall -fomit-frame-pointer
STRIP = strip
#CFLAGS += -DTRACE
#CFLAGS += -g
#CFLAGS += -pg
###########################################################################
# Auxillary Programs ######################################################
LN = ln
LNFLAGS = -s
RM = rm
RMFLAGS = -f
TOUCH = touch
CP = cp
CHMOD = chmod
TAR = tar
CI = ci
CO = co
###########################################################################
# Files ###################################################################
SRC = since.c
OBJ = since.o
TARGET = since
MAN = since.1
INTARGET = /usr/local/bin/since
INMAN = /usr/local/man/man1/since.1
###########################################################################
# Generic build all #######################################################
all : $(TARGET)
###########################################################################
# Install #################################################################
install : $(TARGET)
$(CP) $(TARGET) $(INTARGET)
$(CHMOD) 755 $(INTARGET)
$(CP) $(MAN) $(INMAN)
$(CHMOD) 755 $(INMAN)
###########################################################################
# Build since executable ##################################################
$(TARGET) : $(OBJ)
$(CC) $(CFLAGS) $(OBJ) -o $(TARGET)
$(STRIP) $(TARGET)
###########################################################################
# Build object files from source ##########################################
.c.o :
$(CC) $(CFLAGS) -c $*.c
###########################################################################
# Transport - zip the entire thing ########################################
transport :
$(TOUCH) -t 01010000 *
$(TOUCH) -t 01010001 since.c
$(TAR) czvf since-0.1.tar.gz since-0.1/$(SRC) since-0.1/$(MAN) since-0.1/$(TARGET) since-0.1/Makefile since-0.1/README since-0.1/INSTALL since-0.1/COPYING since-0.1/since-0.1.lsm
###########################################################################
# Remove intermediate files ###############################################
clean :
$(RM) $(RMFLAGS) *.o core
reallyclean : clean
$(RM) $(RMFLAGS) $(TARGET)
since 0.1
since is like tail(1) with state - it allows the user to
view only the lines appended to a log file since the last
time since was used.
read INSTALL for installation instructions.
since is released under the terms of the GNU public
license. Click accept now... errr... sorry... just
look at COPYING.
since was hacked in half a day. So unlikely to be
bugfree. But it works for me.
Begin3
Title: since
Version: 0.1
Entered-date: 11JUL98
Description: Tail(1) with state. It allows the user to
view only the data appended to log files
since the last time.
Keywords: tail log viewer
Platforms: linux
Copying-policy: GPL
End
.\" Process this file with
.\" groff -man -Tascii since.1
.\"
.TH SINCE 1 "JULY 1998" Linux "User Manuals"
.SH NAME
since \- display content of a file since the last time
.SH SYNOPSIS
.B since [-hnv]
.I files
.SH DESCRIPTION
.B since
is similar to
.B tail
since it also displays the tail of a file. However
.B since
displays only the data which has been added since the last time
.B since
was run. If
.B since
has not been run before the entire
file is displayed.
.B since
is useful for watching over log files.
.SH EXAMPLE USAGE
.B since -v /var/log/xferlog | less
(type the command, then ftp something from localhost,
then type the command again)
.SH OPTIONS
.IP -h
Print a terse help message.
.IP -n
Do not update the
.I .since
file which keeps track of file growth.
.IP -v
Increase the verbosity of the output.
.SH FILES
.I .since
.RS
File recording the length of the files displayed previously.
The location of the file can be set by using the
.B SINCE
environment variable, for example
.B export SINCE=
.I /var/log/sincefile
will tell
.B since
to use the file
.I /var/log/sincefile.
If the
.B SINCE
environment variable has not been set
.B since
will use the
.B HOME
environment variable and store the information in the file
.B .since
in the directory pointed to by the variable. If neither the
.B SINCE
nor the
.B HOME
variable are set
.B since
will use the file
.I /tmp/since.
.RE
.SH BUGS
.B since
uses the inode of a file as its key, if that inode is recycled
.B since
might get confused.
.B since
is not particularly efficient when storing the
.BI stat()
information, but should work reasonably well unless you plan to look at
thousands of files. Functionality equivalent to
.B since
can probably be achieved with a number of trivial
shell scripts.
.SH "COPYING"
.B since
may only be used, distributed and modified in accordance with
the terms of the
.B GPL (GNU Public License)
as published by the
.B FSF (Free Software Foundation).
.SH "SEE ALSO"
.BR tail (1),
.BR stat (2).
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment