On Wed, Jan 08, 2020 at 09:39:59PM -0500, Michael Stone wrote:
With a large block size dd will be limited by disk bandwidth for this
use case. cp may hit the disk bandwidth limit or may not, depending on
various factors which may not be obvious. Plus, dd is well understood
for this purpose, and can be configured with nifty progress updates.
:)
Yes. `dd` is a funny tool, since it's very "un-UNIXy" in some ways
(weird command line foo=bar syntax). I *think* `cp` (at least GNU cp)
will adjust buffer sizes etc to be as optimal as possible. But come
to think of it, unless you specify (bad) values for `dd`, there's no
reason it couldn't also do that. My preference for `cp` for this purpose
is reminding myself that the "everything is a file" design philosophy is
still true, sometimes.
But perhaps there's value in having `dd` as "the tool you zero disks
with". It means, when reaching for `dd`, you engage the mental mode of
"careful to pick the right disk". Using plain `cp`, you would not
necessarily do that.
--
Jonathan Dowland