[fakename]$ { time true; } 2> test.log
[fakename]$ cat test.log
real 0m0.000s
user 0m0.000s
sys 0m0.000s
It seems that time
is writing to standard error. I've tried redirecting other file descriptors; that always results in the time being printed.
I am led to the conclusion that time
writes to stderr. Why is this the case?
time
d. If it wrote to standard output it would mess up the output of the command.help time
, (well, I am also using the builtin one, not time(1)) which didn't provide much helpful information. Thank you.