Server Fault is a question and answer site for system and network administrators. 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

I need to redirect the output of pv command to a file so i get read it's progress from another process. Or is it any other way i could do that?

share|improve this question
up vote 5 down vote accepted

The progress info goes to standard error so have you tried a | pv ... -f 2> /tmp/out | b? Otherwise an adaptation of the more complicated example from the man page may be used:

( a | pv ... -f | b ) > /tmp/out 2>&1

Stdio buffering may present a problem.

share|improve this answer
I would like to emphasize the use of "-f". From the man page <quote> -f, --force Force output. Normally, pv will not output any visual display if standard error is not a terminal. This option forces it to do so.</quote> This is particularly useful when using it with a job-scheduler (e.g., oarsub) – Shadow Jan 26 '15 at 9:39

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.