Print pv output (stderr) to file
问题 How can I print the stderr output of pv to a file? For example: timeout 5s dd if=/dev/random | pv -r > /dev/null [ 505kiB/s] The rate line output is "updated" over the course of my five second timeout. I tried this but it does not work (log is empty): timeout 5s dd if=/dev/random | pv -r > /dev/null 2> rates.log I believe it has something to do with carriage returns in the stderr output, but after an hour I am stuck. Ideally my log file would have multiple lines each time pv prints a new