|
Welp, unless your version of cp has hooks for this, the best you can do is guess. It's probably more aggravating than helpful if the guesstimated remaining time is completely off base, so perhaps it's just better to display a spinning cursor.
You could copy a smaller file first to calibrate, and then extrapolate a time estimation from that, but what if the disk gets jammed or another process accesses the disk at the same time?
If you don't have dd, chances are any useful tools for cobbling together some eye candy won't be available either ... (I'd be hoping that dd is available if cp is, though.)
Another approach would be to run cp in the background and watch the size of the destination file, and calculate a percentage from that. I'd be nervous about putting cp in the background and lose on error checking etc just to get some pretty text on the screen, though.
|