Linux/ts: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "== ts == ts adds a timestamp to the beginning of each line of input == Timestamp Output == tail -f /some/device | ts")
 
Line 2: Line 2:


  ts adds a timestamp to the beginning of each line of input
  ts adds a timestamp to the beginning of each line of input
The optional format parameter controls how the timestamp is formatted, as used by strftime(3)
The default format is "%b %d %H:%M:%S"
ts
-r # relative time ago (eg. 15m5s ago)
-i # incremental time
-s # time since program start
-m # monotonic clock


== Timestamp Output ==
== Timestamp Output ==


  tail -f /some/device | ts
  tail -f /some/device | ts

Revision as of 19:02, 3 August 2024

ts

ts adds a timestamp to the beginning of each line of input
The optional format parameter controls how the timestamp is formatted, as used by strftime(3)
The default format is "%b %d %H:%M:%S"
ts 
-r # relative time ago (eg. 15m5s ago)
-i # incremental time
-s # time since program start
-m # monotonic clock

Timestamp Output

tail -f /some/device | ts