brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: ts from moreutils puts a time stamp in front of each terminal line

Terminal
~/tips/tip-terminal-ts-moreutils-timestamps

sudo apt install moreutils

Adds a time to every line of command output, for slow-step hunting.

Plain command output has no timing, and ts adds it without touching the command.

sudo apt install moreutils
ping -c 3 example.org | ts '%H:%M:%S'

ts reads lines and adds the current time in front, using strftime formats. ts -i prints the time since the previous line, which shows where a slow job spends its time, and ts -s prints the time since start. The program comes from the moreutils package. On macOS the same package is in Homebrew.

Further reading: ts manual page

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link