shamelessly stolen from nixCraft on mastodon

  • @azertyfun
    link
    26 months ago

    I mean yeah, the bits end up where they should. It’s just that the speed/progress indication is near useless with pv since at the end of the copy you still need to wait for the entire write buffer to be flushed (2 GiB in my experience, which can take several minutes).

    So IMO dd with at least oflag=osync,odirect is safer than cp and pv with which a newbie might forget to run sync and unplug the usb key immediately, so they’ll be missing a lot of data.

    Maybe some people use dd for the wrong reason, it’s their problem, but the solution is to use dd bs=4M oflag=osync,odirect, not to use cp.