dd 立即完成但实际上需要同步

Mus*_*afa 1 linux usb dd

我使用 dd 将 iso 复制到 USB 驱动器。我有一个 SSD,所以它读取速度非常快,但是我有一个 USB 2.0 驱动器,最多 480 Mbps,但它说它以 404 MB/s 的速度复制,这是不可能的。我需要sync在我的dd. 我在 dd 中使用了同步标志,但没有帮助,我该怎么办?

$dd if=ubuntu-13.10-server-amd64.iso of=/dev/sdb bs=1M conv=sync,noerror
672+0 records in
672+0 records out
704643072 bytes (705 MB) copied, 1,74625 s, 404 MB/s
Run Code Online (Sandbox Code Playgroud)

这是我的内核:

$ uname -a
Linux C3PO 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

Dan*_*l B 5

conv=sync 不激活同步输入或输出:

用 NUL 填充每个输入块到 ibs-size;当与 block 或 unblock 一起使用时,用空格而不是 NUL 填充

相反,您可能想尝试conv=fdatasync

在完成之前物理写入输出文件数据

更直观的当然是oflag=sync

dsync – 对数据使用同步 I/O

同步 - 同样,但也适用于元数据

来源: man 1 dd