Hacker News new | ask | show | jobs
by teraflop 4360 days ago
You can start pv without an estimated size, run du in the background, and then supply the estimate to pv once it's calculated using the '-R' (remote control) option.

A bit clumsy, but it shouldn't be hard to write a little script to do it.

1 comments

Cool, didn't know about that pv had a remote control.

Anyway, if cp -R had a progress bar it would behave the same way, i.e. it would have first to recursively stat the source the same way as du does, and only then it could start reporting a completion percentage.