123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- .TH "ttail" 1 "Mon May 15 2017" "Version 0.0.1" "ttail" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- ttail \- timed tail for logfiles
- .SH "SYNOSPIS"
- .PP
- ttail [OPTION]\&.\&.\&. [FILE]\&.\&.\&.
- .SH "DESCRIPTION"
- .PP
- Display loglines given a minimum date and/or a maximum date\&.
- .PP
- \fB-d --date-min=DATE\fP
- .RS 4
- Start to output loglines starting from this date
- .RE
- .PP
- \fB-m --date-max=DATE\fP
- .RS 4
- Stop to output loglines starting from this date
- .RE
- .PP
- \fB-f --date-format=FMT\fP
- .RS 4
- The date format present in the logfiles and used by -d --date-min and -m --date-max options (see \fBDate formats\fP for more details)
- .RE
- .PP
- \fB-p --prefix-len\fP
- .RS 4
- Set a constant prefix len to drop for each logline
- .RE
- .PP
- \fB-r --re-prefix=REGEX\fP
- .RS 4
- Drop matching prefix for each logline
- .RE
- .PP
- \fB-E --re-extended \fP
- .RS 4
- Interpret -r --re-prefix as an extended regular expression (specified by POSIX)
- .RE
- .PP
- \fB-I --re-ignore-cas\fP
- .RS 4
- Ignore case for -r --re-prefix option (specified by POSIX)
- .RE
- .PP
- \fB-v[v[v[\&.\&.\&.]]]\fP
- .RS 4
- Augment the loglevel
- .RE
- .PP
- .SH "Date formats"
- .PP
- ttail understand two date formats : strprtime and relative
- .SS "Relative date format"
- Relative date format is used with -d --date-min or -m --date-max arguments\&. The shape of a relative date is '-#[VAL][UNIT]' with VAL an integer and UNIT one of the recognized units :
- .IP "\(bu" 2
- y[ear]
- .IP "\(bu" 2
- M[onth]
- .IP "\(bu" 2
- d[ay]
- .IP "\(bu" 2
- h[our]
- .IP "\(bu" 2
- m[in]
- .IP "\(bu" 2
- s[ec]
- .PP
- .SS "Strptime date format"
- The supported input field descriptors are listed below\&. In case a text string (such as the name of a day of the week or a month name) is to be matched, the comparison is case insensitive\&. In case a number is to be matched, leading zeros are permitted but not required\&.
- .PP
- %% The % character\&.
- .PP
- %a or A The name of the day of the week according to the current locale, in abbreviated form or the full name\&.
- .PP
- %b or B or h The month name according to the current locale, in abbreviated form or the full name\&.
- .PP
- %c The date and time representation for the current locale\&.
- .PP
- %C The century number (0-99)\&.
- .PP
- %d or e The day of month (1-31)\&.
- .PP
- %D Equivalent to m/d/y\&. (This is the American style date, very confusing to non-Ameri‐ cans, especially since d/m/y is widely used in Europe\&. The ISO 8601 standard format is Y-m-d\&.)
- .PP
- %H The hour (0-23)\&.
- .PP
- %I The hour on a 12-hour clock (1-12)\&.
- .PP
- %j The day number in the year (1-366)\&.
- .PP
- %m The month number (1-12)\&.
- .PP
- %M The minute (0-59)\&.
- .PP
- %n Arbitrary whitespace\&.
- .PP
- %p The locale's equivalent of AM or PM\&. (Note: there may be none\&.)
- .PP
- %r The 12-hour clock time (using the locale's AM or PM)\&. In the POSIX locale equivalent to %I:M:S p\&. If t_fmt_ampm is empty in the LC_TIME part of the current locale, then the behavior is undefined\&.
- .PP
- %R Equivalent to H:M\&.
- .PP
- %S The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed)\&.
- .PP
- %t Arbitrary whitespace\&.
- .PP
- %T Equivalent to H:M:S\&.
- .PP
- %U The week number with Sunday the first day of the week (0-53)\&. The first Sunday of Janu‐ ary is the first day of week 1\&.
- .PP
- %w The ordinal number of the day of the week (0-6), with Sunday = 0\&.
- .PP
- %W The week number with Monday the first day of the week (0-53)\&. The first Monday of Janu‐ ary is the first day of week 1\&.
- .PP
- %x The date, using the locale's date format\&.
- .PP
- %X The time, using the locale's time format\&.
- .PP
- %y The year within century (0-99)\&. When a century is not otherwise specified, values in the range 69-99 refer to years in the twentieth century (1969-1999); values in the range 00-68 refer to years in the twenty-first century (2000-2068)\&.
- .PP
- %Y The year, including century (for example, 1991)\&.
- .PP
- Some field descriptors can be modified by the E or O modifier characters to indicate that an alternative format or specification should be used\&. If the alternative format or specification does not exist in the current locale, the unmodified field descriptor is used\&.
- .PP
- The E modifier specifies that the input string may contain alternative locale-dependent versions of the date and time representation:
- .PP
- %Ec The locale's alternative date and time representation\&.
- .PP
- %EC The name of the base year (period) in the locale's alternative representation\&.
- .PP
- %Ex The locale's alternative date representation\&.
- .PP
- %EX The locale's alternative time representation\&.
- .PP
- %Ey The offset from EC (year only) in the locale's alternative representation\&.
- .PP
- %EY The full alternative year representation\&.
- .PP
- The O modifier specifies that the numerical input may be in an alternative locale-dependent for‐ mat:
- .PP
- %Od or Oe The day of the month using the locale's alternative numeric symbols; leading zeros are permitted but not required\&.
- .PP
- %OH The hour (24-hour clock) using the locale's alternative numeric symbols\&.
- .PP
- %OI The hour (12-hour clock) using the locale's alternative numeric symbols\&.
- .PP
- %Om The month using the locale's alternative numeric symbols\&.
- .PP
- %OM The minutes using the locale's alternative numeric symbols\&.
- .PP
- %OS The seconds using the locale's alternative numeric symbols\&.
- .PP
- %OU The week number of the year (Sunday as the first day of the week) using the locale's alternative numeric symbols\&.
- .PP
- %Ow The ordinal number of the day of the week (Sunday=0), using the locale's alternative numeric symbols\&.
- .PP
- %OW The week number of the year (Monday as the first day of the week) using the locale's alternative numeric symbols\&.
- .PP
- %Oy The year (offset from C) using the locale's alternative numeric symbols\&.
- .SH "Known limitations"
- .PP
- Loglines has to be sorted\&.
- .SH "AUTHOR"
- .PP
- Written by Yann Weber <yann.weber@members.fsf.org>
- .SH "COPYRIGHT"
- .PP
- Copyright © 2017 Weber Yann License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\&.
- .PP
- This is free software: you are free to change and redistribute it\&. There is NO WARRANTY, to the extent permitted by law\&.
|