File: since.1

package info (click to toggle)
since 1.1-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 384 kB
  • sloc: ansic: 7,220; makefile: 43; sh: 30
file content (164 lines) | stat: -rw-r--r-- 3,427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
.TH SINCE 1 "JULY 1998" Linux "User Manuals"
.SH NAME
since \- display content of a file since the last time
.SH SYNOPSIS
.B since [-aefhlmnqvxz] [-d 
.IB seconds ]
.B [-s
.IB file ]
.I files

.SH DESCRIPTION
.B since
is a utility designed to monitor log files.
.B since
is similar to
.BR tail (2)
as it also displays information appended to a file. 
However
.B since
only displays the data which has been added 
.I since 
the last time
.B since
was run. If 
.B since
is run on a particular file for the first time, 
then the entire file is displayed.
.SH EXAMPLE
.B since /var/log/apache/{access,error}_log > /dev/null
.br
.B lynx --dump http://localhost/ > /dev/null
.br
.B since /var/log/apache/{access,error}_log

.SH OPTIONS

.IP -a
Make updates to the since state files atomic. This option
configures 
.B since 
to use a temporary file and a 
.BR rename (2)
instead of updating the state file in situ.

.IP "-d seconds"
Specify the number of integer seconds to wait between 
polling files for changes. This option is only relevant
in conjunction with the 
.B -f
option and if the inotify mechanism is not being used.

.IP -e
Print the header lines to standard error instead of 
standard output.

.IP -f
Follow the specified files. This option is analogous to 
.B "tail -f"
as the files are also polled for changes until the
process is interrupted. 

.IP -h
Print a terse help message.

.IP -l
Relaxed mode. If some data files are inaccessible 
.B since 
will not fail completely. 

.IP -m
Disable 
.BR mmap (2),
use 
.BR read (2)
instead to access state and data files. 
Note that for certain smaller io operations
.BR read (2)
may be used even if this option has not been given.

.IP -n
Do not update the
.I .since
file which keeps track of file growth.

.IP -q
Make the utility operate more quietly.

.IP "-s filename"
Specify the state file explicitly. Using this option
will also disable the use of fallback state files.

.IP -v
Increase the verbosity. This option can be given
multiple times.

.IP -x
Ignore file arguments which have compressed extensions.

.IP -z
Discard output. Similar to redirecting the
output to 
.IR /dev/null ,
but faster. If used in conjunction with 
the 
.B -f 
option, only the initial output will be discarded.

.SH FILES
.I .since

.RS
State file recording the length of the previously displayed files.
The location of the file can be set on the command line 
using the 
.B -s 
option. If this option is not given, 
.B since
will check the 
.B SINCE
environment variable for the location of
the state file. 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
.IR $HOME/.since .
If the
.B HOME 
variable is not set, 
.B since 
will use a 
.BR getpwuid (3)
lookup. If all these fail
will use the file
.IR /tmp/since .
.RE

.SH BUGS
.B since
uses the inode of a file as its key, if that inode is recycled
.B since
will get confused. 
.B since
is not particularly efficient when storing or looking up the
.BR stat (2)
information. 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 General Public License) 
version 
.B 3 or newer 
as published by the
.B FSF (Free Software Foundation).
.SH "SEE ALSO"
.BR tail (1),
.BR stat (2).