News for hackers. Stuff that matters.
Re:dd built-in progress introduced in coreutils 8.24 by rogerbinns on Sunday January 10, 2016 @09:21PM (#10878391)
If all you are doing is the above, then you don't need dd at all. pv will act like dd (but with stdin/out) and uses a sensible buffer size you can override. Your first example becomes:

  pv --buffer-size 1m < /dev/sda > sda.file
http://www.ivarch.com/programs/quickref/pv.shtml

  -B BYTES, --buffer-size BYTES
    Use a transfer buffer size of BYTES bytes. A suffix of "k", "m", "g", or
    "t" can be added to denote kilobytes (*1024), megabytes, and so on. The 
    default buffer size is the block size of the input file's filesystem 
    multiplied by 32 (512kb max), or 400kb if the block size cannot be 
    determined.
pv is great tool and works really well. On Linux you can even point it at other process ids, and it will automatically scan their open file descriptors and show progress of relevant ones.
Re:dd built-in progress introduced in coreutils 8.24 by ckuehl on Monday January 11, 2016 @12:22AM (#10878985)
Just be very careful which direction you point those arrows :-)

I've have similar nightmares about typoing `if` and `of` when using dd.

Re:dd built-in progress introduced in coreutils 8.24 by agumonkey on Monday January 11, 2016 @03:39AM (#10879609)
Quite often, when I'm about to write a command involving `dd`, the first character I type is #.
Re:dd built-in progress introduced in coreutils 8.24 by Tiksi on Monday January 11, 2016 @03:06AM (#10879510)
You can also drop the `<` in that example, pv takes a file to read from as an argument:

  pv --buffer-size 1m /dev/sda > sda.file
Will do the same thing, and give an accurate % complete progress bar.
Re:dd built-in progress introduced in coreutils 8.24 by aktau on Monday January 11, 2016 @04:14AM (#10879725)
> Will do the same thing, and give an accurate % complete progress bar.

I'm not sure that's true, last time I tried to do:

  pv < /dev/zero > /dev/sda
To zero a drive, it correctly printed out the total size of the output block device. Perhaps it also does this type of scanning on stdin, if possible.

That said, looking at the main page, it appears that this functionality is only available for the output end:

Note that if the input size cannot be calculated, and the output is a block device, then the size of the block device will be used and pv will automatically stop at that size as if -S had been given. (http://www.ivarch.com/programs/quickref/pv.shtml)

Re:dd built-in progress introduced in coreutils 8.24 by Tiksi on Monday January 11, 2016 @08:32AM (#10880632)
Ah, I see what you mean, I was thinking in terms of images/files.

As an arguement it gives % of the input (64GB usb drive, 8GB image):

  > pv /mnt/str/Downloads/stick-8g.img > /dev/sdi
  916MiB 0:00:35 [1.88MiB/s] [========>                                                                           ] 11% ETA 0:04:17
Otherwise it seems to give the size of the output if it's a block device.