TS(1)
๐ TS(1) ๐
okay bestie, buckle up, because ts from the moreutils crew is here and she is so much more useful than her tiny name makes her sound ๐ซถ
โจ NAME โจ
ts โ she timestamps your input, that's the whole job, and she eats every time ๐
๐ธ SYNOPSIS ๐ธ
ts [-r] [-i | -s] [-m] [format]
๐ฆ DESCRIPTION ๐ฆ
ts adds a timestamp to the beginning of each line of input. That's it. That's the whole vibe. Your boring stream of lines becomes a little diary with receipts. ๐โจ
The optional format parameter controls how the timestamp is formatted, exactly as used by strftime(3). The default format is "%b %d %H:%M:%S" โ iconic, timeless, no notes.
Now here's the spicy part ๐ฅ: besides all the regular strftime conversion specifications, ts also gives you "%.S", "%.s" and "%.T". These are like "%S", "%s" and "%T" but with subsecond resolution, iykyk. So instead of a boring whole second you get stuff like "30.00001" and "1301682593.00001" and "1:15:30.00001". Tiny little crumbs of precision ๐โจ
If the -r switch is passed, she switches gears entirely: instead of adding timestamps, she converts existing timestamps in the input to relative times, like "15m5s ago". So relatable, honestly โ everything is "ago" if you think about it ๐ญ. Lots of common timestamp formats are supported, ngl she's flexible like that.
โ ๏ธ bestie, heads up: theTime::DurationandDate::Parseperl modules are required for this mode to work. If you don't have them, this mode is just not happening. Also โ currently, converting localized dates is not supported. Periodt.
If both -r and a format is passed, then the existing timestamps get converted to the specified format instead. Two modes, one slay ๐
If the -i or -s switch is passed, ts reports incremental timestamps instead of absolute ones. The default format changes to "%H:%M:%S" when you do this (not the usual default, kmow the difference bestie), and "%.S" and "%.s" can be used as well.
- in case of
-i, every timestamp will be the time elapsed since the last timestamp โ so it's like, what changed since last time? deltas, gaps, the drama between lines ๐ - in case of
-s, the time elapsed since start of the program is used โ so it's a running stopwatch from the moment she woke up โฑ๏ธ
The -m switch makes the system's monotonic clock be used. Main character energy: she does not care what the wall clock thinks, she only moves forward. ๐
๐ฟ ENVIRONMENT ๐ฟ
TZโ the standardTZenvironment variable controls what time zone dates are assumed to be in, if a timezone is not specified as part of the date. Basically: if the date doesn't say where it's from,TZgets to decide its whole personality. ๐ฐ๏ธ
๐ AUTHOR ๐
Copyright 2006 by Joey Hess <id@joeyh.name> ๐
Licensed under the GNU GPL.
and that's the whole page, bestie ๐ this is TS(1) from moreutils, dated 2026-04-16 โ go timestamp something and make it everyone's problem. no cap. ๐ฆโจ
๐ฆ where this page comes from
- ubuntu stonking: moreutils 0.70-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms