Is there any difference between doing i.e.
dd bs=4M if=archlinux.iso of=/dev/sdx status=progress oflag=sync or doing
cp archlinux.iso /dev/sdx && sync, and reason to use one over the other? (aside from the pretty progress bar in dd)
One difference is efficiency, and thus speed. For example, you could get the bytes one by one and copy them to the device, with
cat archlinux.iso > /dev/sdx
In theory cat will move each byte independently. That is a slow process, although in practice there will be buffers involved.
dd and a good block size (usually related to the physical block size) it will be faster.
cp it depends on the buffer size used by
cp (not under your control) and other buffers on the way. Theoretically the efficiency lies between
An analogy: it is like pouring the contents of a glass into another glass.
cat will do it one drop at a time.
dd will use a spoon, and you define how big the spoon is (system limits apply)
cp will use its own spoon, and you don't know how big it is.
I use it mainly because of the
status=progress you mentioned; what can I say, I am impatient and need to know :-)
Even if you forgot to add that and started the job, you can send it a SIGUSR1 signal and it will print the current I/O statistics to stderr (which, unless you redirected it, is your terminal).