aboutsummaryrefslogtreecommitdiff
path: root/addts.1
diff options
context:
space:
mode:
Diffstat (limited to 'addts.1')
-rw-r--r--addts.120
1 files changed, 14 insertions, 6 deletions
diff --git a/addts.1 b/addts.1
index bd4664b..fce0eb3 100644
--- a/addts.1
+++ b/addts.1
@@ -1,13 +1,12 @@
-.TH ADDTS 1 "June 20, 2018" ADDTS "User Commands"
+.TH ADDTS 1 "June 22, 2018" ADDTS "User Commands"
.SH NAME
addts \- add timestamps at the beginning of each line
.SH SYNOPSIS
.nh
.na
\fBaddts\fR\
- [\fB\-au\fR]\
+ [\fB\-asu\fR]\
[\fB\-f \fIFMT\fR]\
- [\fB\-i \fINUM\fR]\
[\fB\-w \fICHR\fR]\
[\fIFILE\fR]
.PP
@@ -16,12 +15,19 @@ addts \- add timestamps at the beginning of each line
.hy
.SH DESCRIPTION
Reads standard input and writes it to standard output, adding a
-timestamp at the begginning of each line. If \fIFILE\fR is suppied,
+timestamp at the begginning (or end) of each line. If \fIFILE\fR is suppied,
writes to it instead. Typical usage is for Apache forensic log:
.PP
.EX
ForensicLog "|/usr/bin/addts -a /var/log/httpd/forensic.log"
.EE
+.PP
+To add timestamps to the end of each line, formatting it as an
+additional header:
+.PP
+.EX
+ForensicLog "|/usr/bin/addts -a -s -f '|X-TS:%c' /var/log/httpd/forensic.log"
+.EE
.SH OPTIONS
.TP
.B \-a
@@ -37,8 +43,8 @@ which is replaced with micronseconds.
.sp
See also \fB\-w\fR, below.
.TP
-.BI \-i " NUM"
-Pass first \fINUM\fR lines unchanged.
+.B \-s
+Add timestamp to the end of each line (suffix mode).
.TP
.B \-u
Report times in UTC.
@@ -55,6 +61,8 @@ ForensicLog "|/usr/bin/addts -w_ -f %Y-%m-%d_%H:%M:%S.%@:_ \\
.EE
.SH BUGS
Formatted timestamp cannot be longer than 511 bytes.
+.PP
+Empty lines are left unchanged (no timestamp added).
.SH "SEE ALSO"
.BR strftime (3).
.SH AUTHORS

Return to:

Send suggestions and report system problems to the System administrator.