[BACK]Return to ts.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ts

Annotation of src/usr.bin/ts/ts.1, Revision 1.2

1.2     ! job         1: .\"    $OpenBSD: ts.1,v 1.1 2022/06/29 08:39:49 job Exp $
1.1       job         2: .\"
                      3: .\" Copyright (c) 2022 Job Snijders <job@openbsd.org>
                      4: .\"
                      5: .\" Permission to use, copy, modify, and distribute this software for any
                      6: .\" purpose with or without fee is hereby granted, provided that the above
                      7: .\" copyright notice and this permission notice appear in all copies.
                      8: .\"
                      9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     16: .\"
1.2     ! job        17: .Dd $Mdocdate: June 29 2022 $
1.1       job        18: .Dt TS 1
                     19: .Os
                     20: .Sh NAME
                     21: .Nm ts
                     22: .Nd timestamp input
                     23: .Sh SYNOPSIS
                     24: .Nm ts
                     25: .Op Fl i | s
1.2     ! job        26: .Op Fl m
1.1       job        27: .Op Ar format
                     28: .Sh DESCRIPTION
                     29: When invoked, the
                     30: .Nm
                     31: utility adds a timestamp to the beginning of each line of input.
                     32: .Pp
                     33: The options are as follows:
                     34: .Bl -tag -width Ds
                     35: .It Fl i
                     36: Display time elapsed since the last timestamp.
1.2     ! job        37: .It Fl m
        !            38: Display timestamps derived from a strictly linearly increasing clock.
        !            39: Without
        !            40: .Fl m ,
        !            41: timestamps reflect the current date and time, including time jumps if the
        !            42: system time is changed.
1.1       job        43: .It Fl s
                     44: Display time elapsed since the start of the program.
                     45: .El
                     46: .Pp
                     47: The optional
                     48: .Ar format
                     49: argument controls how the timestamp is displayed, according to the conversion
                     50: specifications described in the
                     51: .Xr strftime 3
                     52: manual page.
                     53: The default format is
                     54: .Qq %b %d %H:%M:%S ,
                     55: or
                     56: .Qq %H:%M:%S
                     57: if an option is used.
                     58: .Pp
                     59: The following non-standard conversion specifications append microsecond
                     60: resolution:
                     61: .Cm \&%.S ,
                     62: .Cm \&%.s ,
                     63: and
                     64: .Cm \&%.T ;
                     65: which are similar to
                     66: .Cm \&%S ,
                     67: .Cm \&%s ,
                     68: and
                     69: .Cm \&%T .
                     70: Examples:
                     71: .Qq 10.00001 ,
                     72: .Qq 1656427781.00001 ,
                     73: and
                     74: .Qq 4:20:00.00001 .
                     75: .Sh EXAMPLES
                     76: .Bd -literal -offset indent
                     77: $ (echo foo; sleep 2; echo bar) | ts
                     78: Jun 28 12:13:38 foo
                     79: Jun 28 12:13:40 bar
                     80:
                     81: $ ls | ts -i %.S
                     82: 00.000452 CVS
                     83: 00.000595 Makefile
                     84: 00.000004 ts.1
                     85: 00.000004 ts.c
                     86: .Ed
                     87: .Sh HISTORY
                     88: A
                     89: .Nm
                     90: utility first appeared in the moreutils collection by Joey Hess, and was
                     91: rewritten from scratch for
                     92: .Ox 7.2 .
                     93: .Sh AUTHORS
                     94: This
                     95: .Nm
                     96: utility was written by
                     97: .An Job Snijders Aq Mt job@openbsd.org
                     98: and
                     99: .An Claudio Jeker Aq Mt claudio@openbsd.org .