timed tail for logfiles. Display loglines given a minimum date and/or a maximum date.
c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ttail.1 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. .TH "ttail" 1 "Sun May 21 2017" "Version 0.1" "ttail" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ttail \- timed tail for logfiles
  6. .SH "SYNOSPIS"
  7. .PP
  8. ttail [OPTION]\&.\&.\&. [FILE]\&.\&.\&.
  9. .SH "DESCRIPTION"
  10. .PP
  11. Display loglines given a minimum date and/or a maximum date\&.
  12. .PP
  13. For huge files (or a huge list of files) you should have better performance giving files as argument (thank's to binary search on file list and in files)\&.
  14. .PP
  15. \fB-d --date-min=DATE\fP
  16. .RS 4
  17. Start to output loglines starting from this date
  18. .RE
  19. .PP
  20. \fB-m --date-max=DATE\fP
  21. .RS 4
  22. Stop to output loglines starting from this date
  23. .RE
  24. .PP
  25. \fB-f --date-format=FMT\fP
  26. .RS 4
  27. 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)
  28. .RE
  29. .PP
  30. \fB-p --prefix-len\fP
  31. .RS 4
  32. Set a constant prefix len to drop for each logline
  33. .RE
  34. .PP
  35. \fB-P --permissive\fP
  36. .RS 4
  37. Tell ttail to continue after some errors (prefix or date not found, invalid file, etc\&.)
  38. .RE
  39. .PP
  40. \fB-r --re-prefix=REGEX\fP
  41. .RS 4
  42. Drop matching prefix for each logline
  43. .RE
  44. .PP
  45. \fB-E --re-extended \fP
  46. .RS 4
  47. Interpret -r --re-prefix as an extended regular expression (specified by POSIX)
  48. .RE
  49. .PP
  50. \fB-I --re-ignore-cas\fP
  51. .RS 4
  52. Ignore case for -r --re-prefix option (specified by POSIX)
  53. .RE
  54. .PP
  55. \fB-v[v[v[\&.\&.\&.]]]\fP
  56. .RS 4
  57. Augment the loglevel
  58. .RE
  59. .PP
  60. .SH "Date formats"
  61. .PP
  62. ttail understand two date formats : strprtime and relative
  63. .SS "Relative date format"
  64. 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 :
  65. .IP "\(bu" 2
  66. y[ear]
  67. .IP "\(bu" 2
  68. M[onth]
  69. .IP "\(bu" 2
  70. d[ay]
  71. .IP "\(bu" 2
  72. h[our]
  73. .IP "\(bu" 2
  74. m[in]
  75. .IP "\(bu" 2
  76. s[ec]
  77. .PP
  78. .SS "Strptime date format"
  79. 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\&.
  80. .PP
  81. %% The % character\&.
  82. .PP
  83. %a or A The name of the day of the week according to the current locale, in abbreviated form or the full name\&.
  84. .PP
  85. %b or B or h The month name according to the current locale, in abbreviated form or the full name\&.
  86. .PP
  87. %c The date and time representation for the current locale\&.
  88. .PP
  89. %C The century number (0-99)\&.
  90. .PP
  91. %d or e The day of month (1-31)\&.
  92. .PP
  93. %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\&.)
  94. .PP
  95. %H The hour (0-23)\&.
  96. .PP
  97. %I The hour on a 12-hour clock (1-12)\&.
  98. .PP
  99. %j The day number in the year (1-366)\&.
  100. .PP
  101. %m The month number (1-12)\&.
  102. .PP
  103. %M The minute (0-59)\&.
  104. .PP
  105. %n Arbitrary whitespace\&.
  106. .PP
  107. %p The locale's equivalent of AM or PM\&. (Note: there may be none\&.)
  108. .PP
  109. %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\&.
  110. .PP
  111. %R Equivalent to H:M\&.
  112. .PP
  113. %S The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed)\&.
  114. .PP
  115. %t Arbitrary whitespace\&.
  116. .PP
  117. %T Equivalent to H:M:S\&.
  118. .PP
  119. %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\&.
  120. .PP
  121. %w The ordinal number of the day of the week (0-6), with Sunday = 0\&.
  122. .PP
  123. %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\&.
  124. .PP
  125. %x The date, using the locale's date format\&.
  126. .PP
  127. %X The time, using the locale's time format\&.
  128. .PP
  129. %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)\&.
  130. .PP
  131. %Y The year, including century (for example, 1991)\&.
  132. .PP
  133. 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\&.
  134. .PP
  135. The E modifier specifies that the input string may contain alternative locale-dependent versions of the date and time representation:
  136. .PP
  137. %Ec The locale's alternative date and time representation\&.
  138. .PP
  139. %EC The name of the base year (period) in the locale's alternative representation\&.
  140. .PP
  141. %Ex The locale's alternative date representation\&.
  142. .PP
  143. %EX The locale's alternative time representation\&.
  144. .PP
  145. %Ey The offset from EC (year only) in the locale's alternative representation\&.
  146. .PP
  147. %EY The full alternative year representation\&.
  148. .PP
  149. The O modifier specifies that the numerical input may be in an alternative locale-dependent for‐ mat:
  150. .PP
  151. %Od or Oe The day of the month using the locale's alternative numeric symbols; leading zeros are permitted but not required\&.
  152. .PP
  153. %OH The hour (24-hour clock) using the locale's alternative numeric symbols\&.
  154. .PP
  155. %OI The hour (12-hour clock) using the locale's alternative numeric symbols\&.
  156. .PP
  157. %Om The month using the locale's alternative numeric symbols\&.
  158. .PP
  159. %OM The minutes using the locale's alternative numeric symbols\&.
  160. .PP
  161. %OS The seconds using the locale's alternative numeric symbols\&.
  162. .PP
  163. %OU The week number of the year (Sunday as the first day of the week) using the locale's alternative numeric symbols\&.
  164. .PP
  165. %Ow The ordinal number of the day of the week (Sunday=0), using the locale's alternative numeric symbols\&.
  166. .PP
  167. %OW The week number of the year (Monday as the first day of the week) using the locale's alternative numeric symbols\&.
  168. .PP
  169. %Oy The year (offset from C) using the locale's alternative numeric symbols\&.
  170. .SH "AUTHOR"
  171. .PP
  172. Written by Yann Weber <yann.weber@members.fsf.org>
  173. .SH "COPYRIGHT"
  174. .PP
  175. Copyright © 2017 Weber Yann License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\&.
  176. .PP
  177. This is free software: you are free to change and redistribute it\&. There is NO WARRANTY, to the extent permitted by law\&.