ETS(1)
π ETS(1) β command output timestamper π
okay so bestie, let me tell you about ets. the manual page calls it a "command output timestamper," which is honestly the most boring way to say "it puts a little timestamp on every line of output so you finally know when things happened." she's giving timekeeper energy and we're obsessed. πβ¨
β¨ SYNOPSIS β¨
ets [-s | -i] [-f format] [-u | -z timezone] [-d delimiter] command
[arg ...]
ets [options] shell_command
ets [options]
πΈ DESCRIPTION πΈ
ets prefixes each line of a command's output with a timestamp. lines are delimited by CR, LF, or CRLF. periodt. π
the three forms up in SYNOPSIS are literally three different ways she can run your command:
- if you give her a single command without whitespace(s), or a command and its arguments, she executes the command with
execin a pty π«Ά - if you give her a single command with whitespace(s), the command is treated as a shell command and executed as
SHELL -c shell_command, whereSHELLis the current user's login shell, orshif login shell cannot be determined - if you give her no command at all, output is read from stdin, and the user is responsible for piping in a command's output. you're the main character here, ngl π
π the three timestamp modes (mutually exclusive, pick one bestie) π
- the default is absolute time mode, where timestamps from the wall clock are shown π°οΈ
-s,--elapsedturns on elapsed time mode, where every timestamp is the time elapsed from the start of the command (using a monotonic clock)-i,--incrementalturns on incremental time mode, where every timestamp is the time elapsed since the last timestamp (using a monotonic clock)
the default format of the prefixed timestamps depends on the timestamp mode active. users may supply a custom format string with the -f, --format option. β¨
the timezone for absolute timestamps can be controlled via the -u, --utc and -z, --timezone options. local time is used by default.
π OPTIONS π
here's the full list, no skipping, we don't do that here π
-s,--elapsedβ run in elapsed time mode.-i,--incrementalβ run in incremental time mode.-f,--formatformat β use customstrftime(3)-style format string format for prefixed timestamps. the default is[%Y-%m-%d %H:%M:%S]for absolute time mode and[%H:%M:%S]for elapsed and incremental time modes. see "FORMATTING DIRECTIVES" for details. π-u,--utcβ use UTC for absolute timestamps instead of local time.
this option is mutually exclusive with--z,--timezone. pick a lane bestie π
-z,--timezonetimezone β use timezone for absolute timestamps instead of local time. timezone is an IANA time zone name, e.g.America/Los_Angeles.
this option is mutually exclusive with-u,--utc. same rule, other direction π
-c,--colorβ print timestamps in color. aesthetically iconic, no notes π-d,--delimitβ change the delimiter between the timestamp and the command output. the default is space.
π¦ FORMATTING DIRECTIVES π¦
formatting directives largely match strftime(3)'s directives on FreeBSD and macOS, with the following differences:
- additional directives
%ffor microsecond and%Lfor millisecond are supported. π₯ - POSIX locale extensions
%E*and%O*are not supported - glibc extensions
%-*,%_*, and%0*are not supported - directives
%G,%g, and%+are not supported
below is the full list of supported directives β yes, all of them, we're going the whole way down the list together bestie π«Ά
%Aβ is replaced by national representation of the full weekday name.%aβ is replaced by national representation of the abbreviated weekday name.%Bβ is replaced by national representation of the full month name.%bβ is replaced by national representation of the abbreviated month name.%Cβ is replaced by (year / 100) as decimal number; single digits are preceded by a zero.%cβ is replaced by national representation of time and date.%Dβ is equivalent to%m/%d/%y.%dβ is replaced by the day of the month as a decimal number (01-31).%eβ is replaced by the day of the month as a decimal number (1-31); single digits are preceded by a blank.%Fβ is equivalent to%Y-%m-%d.%fβ is replaced by the microsecond as a decimal number (000000-999999).%Hβ is replaced by the hour (24-hour clock) as a decimal number (00-23).%hβ the same as%b.%Iβ is replaced by the hour (12-hour clock) as a decimal number (01-12).%jβ is replaced by the day of the year as a decimal number (001-366).%kβ is replaced by the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank.%Lβ is replaced by the millisecond as a decimal number (000-999).%lβ is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank.%Mβ is replaced by the minute as a decimal number (00-59).%mβ is replaced by the month as a decimal number (01-12).%nβ is replaced by a newline.%pβ is replaced by national representation of either "ante meridiem" (a.m.) or "post meridiem" (p.m.) as appropriate.%Rβ is equivalent to%H:%M.%rβ is equivalent to%I:%M:%S %p.%Sβ is replaced by the second as a decimal number (00-60).%sβ is replaced by the number of seconds since the Epoch, UTC (seemktime(3)).%Tβ is equivalent to%H:%M:%S.%tβ is replaced by a tab.%Uβ is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (00-53).%uβ is replaced by the weekday (Monday as the first day of the week) as a decimal number (1-7).%Vβ is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (01-53). if the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1.%vβ is equivalent to%e-%b-%Y.%Wβ is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (00-53).%wβ is replaced by the weekday (Sunday as the first day of the week) as a decimal number (0-6).%Xβ is replaced by national representation of the time.%xβ is replaced by national representation of the date.%Yβ is replaced by the year with century as a decimal number.%yβ is replaced by the year without century as a decimal number (00-99).%Zβ is replaced by the time zone name.%zβ is replaced by the time zone offset from UTC; a leading plus sign stands for east of UTC, a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter between them (common form for RFC 822 date headers).%%β is replaced by%.
π§ SEE ALSO π§
ts(1), strftime(3) β go read those too, they're the extended universe iykyk ππ«
β HISTORY β
the name ets comes from "enhanced ts", referring to moreutils ts(1). a little glow-up origin story, we love to see it π
πΈ AUTHORS πΈ
Zhiming Wang <i@zhimingwang.org> and Contributors β legends, honestly. thank them for the timestamps πβ¨
bestie that's the whole page, every flag, every directive, nothing skipped. now go timestamp something and slay β¨π
this page is from March 2, 2025, and it's the ETS(1) manual β mwah, drink water, and pipe your output responsibly π«Άπ
π¦ where this page comes from
- nixos 26.05: ets 0.3.1
- nixpkgs unstable: ets 0.3.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms