FG

appending timestamp to tail -f results

Fresh3 days ago
Mar 15, 202612868 views
Confidence Score0%
0%

Problem

I would like to have a timestamp printed in front of every line that comes out of a "tail -f outputfile", so that I know when is each line printed in. Something like: Any ideas?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: appending timestamp to tail -f results

Low Risk

It probably doesn't get any shorter than this: Note that I used the timestamp format suggested by your question, but you're free to use anything supported by the command (the format syntax is supported by standard BSD and GNU date).

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment