When writing an ISO image to USB flash drive with dd, how do I know I can remove the stick? Obviously I'll wait until the command completes and I'm back at the terminal prompt. But even then the device might still be busy from a cache/buffer. Because I'm writing to the device itself, nothing is mounted, so I also don't call umount and cannot see if the device is still busy.
I've seen dd ... && sync a few times. But doesn't that block until buffers for all media have been written? Not only the one flash drive that I used dd with. So if I have lots of other write processes, wouldn't that block?
Would the conv= argument for dd help? But which one of conv=sync, conv=fsync, conv=fdatasync, ...?
syncfor this purpose (yes, it flushes all buffers, but that's OK in almost all cases).