this post was submitted on 05 Dec 2023
959 points (98.7% liked)

linuxmemes

20686 readers
1385 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 

shamelessly stolen from nixCraft on mastodon

you are viewing a single comment's thread
view the rest of the comments
[–] azertyfun@sh.itjust.works 2 points 9 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.