On Thu, Jun 21, 2018 at 03:08:10PM +0200, Jan Stary wrote: > On Jun 20 17:32:51, maxim.pich...@gmail.com wrote: > > dd bs=1 count=1234567 will copy 1234567 bytes and then stop, but it's slow. > > $ dd bs=1 count=1234567 < /dev/zero > /dev/null > 1234567+0 records in > 1234567+0 records out > 1234567 bytes transferred in 4.507 secs (273886 bytes/sec) > > $ dd count=1 bs=1234567 < /dev/zero > /dev/null > 1+0 records in > 1+0 records out > 1234567 bytes transferred in 0.001 secs (653970943 bytes/sec)
The latter will stop on a short read. -Otto