1TS(1)                                                                    TS(1)
2
3
4

NAME

6       ts - timestamp input
7

SYNOPSIS

9       ts [-r] [-i | -s] [-m] [format]
10

DESCRIPTION

12       ts adds a timestamp to the beginning of each line of input.
13
14       The optional format parameter controls how the timestamp is formatted,
15       as used by strftime(3). The default format is "%b %d %H:%M:%S". In
16       addition to the regular strftime conversion specifications, "%.S" and
17       "%.s" and "%.T" are like "%S" and "%s" and "%T", but provide subsecond
18       resolution (ie, "30.00001" and "1301682593.00001" and "1:15:30.00001").
19
20       If the -r switch is passed, it instead converts existing timestamps in
21       the input to relative times, such as "15m5s ago". Many common timestamp
22       formats are supported. Note that the Time::Duration and Date::Parse
23       perl modules are required for this mode to work. Currently, converting
24       localized dates is not supported.
25
26       If both -r and a format is passed, the existing timestamps are
27       converted to the specified format.
28
29       If the -i or -s switch is passed, ts reports incremental timestamps
30       instead of absolute ones. The default format changes to "%H:%M:%S", and
31       "%.S" and "%.s" can be used as well. In case of -i, every timestamp
32       will be the time elapsed since the last timestamp. In case of -s, the
33       time elapsed since start of the program is used.
34
35       The -m switch makes the system's monotonic clock be used.
36

ENVIRONMENT

38       The standard TZ environment variable controls what time zone dates are
39       assumed to be in, if a timezone is not specified as part of the date.
40

AUTHOR

42       Copyright 2006 by Joey Hess <id@joeyh.name>
43
44       Licensed under the GNU GPL.
45
46
47
48moreutils                         2019-10-20                             TS(1)
Impressum