This question already has an answer here:
time(1) command allows you to time any command, by passing it as arguments to
I know it's possible to redirect
stdout to a file via
2>&1, and there's also
tee(1) which allows one to copy its input to both the screen and a file. However, I do not know how to add timestamps to logs.
Is there a tool to redirect
stdout to a file, AND append timestamps to it for logging purposes?