Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

this command is to redirect output of time to with multiple args:

$ time wc test >wc.out 2>time.out

unix programming environment book shows that the error output of time redirects to time.out, but it seems that it's treating the 2>time.out portion as part of the wc command and not redirecting the error output to time.out as I expected, so what is the problem?

share|improve this question

The usual solution to this problem is to put your time command in a group:

$ { time wc test >wc.out; } 2>time.out
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.