3 ms·
>> if you want progress information with cat you can combine it with the pv command Since coreutils-8.24[1], dd "accepts a new status=progress level to print d
by miles 10y ago
>> if you want progress information with cat you can combine it with the pv command
Since coreutils-8.24[1], dd "accepts a new status=progress level to print data transfer statistics on stderr approximately every second."
> Because the command probably doesn't figure out the right size automatically . . . this can mean massive performance differences between invocations
For anyone who's wondering, here are two good threads on determining optimal block size: https://superuser.com/questions/234199/good-block-size-for-disk-cloning-with-diskdump-dd https://superuser.com/questions/234199/good-block-size-for-d... http://stackoverflow.com/questions/6161823/dd-how-to-calculate-optimal-blocksize http://stackoverflow.com/questions/6161823/dd-how-to-calcula...
[1] http://savannah.gnu.org/forum/forum.php?forum_id=8309 http://savannah.gnu.org/forum/forum.php?forum_id=8309
- derefr 10y agoOr, before that, just send the dd process SIGINFO to get the same output printed once. `while :; do kill -INFO %1; sleep 1; done` if you want a "progress bar" of sorts. As an aside: On BSDs (incl. macOS), SIGINFO is also able to be sent interactively by the line driver when you type ^T (like ^C sends SIGINT.) Kind of lame that Linux doesn't follow suit [or even have SIGINFO], or we'd see a lot more programs that build in useful "prod me for an update" hooks, the way they already have "prod me to reload my config" SIGHUP hooks.
- dozzie 10y agoErm... It's the first time I see SIGINFO signal. I think you meant SIGUSR1.
- farhaven 10y agoOn Unix, there's SIGINFO, which doesn't exist on Linux systems. That's why coreutils' dd uses SIGUSR1 instead.
- dozzie 10y agoOK, I take I didn't know of BSD-specific signal. But please don't claim it's on Unix, because it's not. Unless you can point me where in SUS (or any other specification) it is defined, as I couldn't find it here: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sign...
- cat199 10y agoBSD is Unix. Don't believe the lies.
- yjftsjthsd-h 10y agoNo, I think GP means SIGINFO, which the BSD family uses. On GNU/Linux SIGUSR1 is a passable substitute. See http://www.unix.com/man-page/FreeBSD/3/siginfo/ http://www.unix.com/man-page/FreeBSD/3/siginfo/ and https://unix.stackexchange.com/questions/179481/siginfo-on-gnu-linux-arch-linux-missing https://unix.stackexchange.com/questions/179481/siginfo-on-g... for more about it.
- dTal 10y agoOn Linux at any rate dd responds to SIGUSR1 in a similar fashion.