Solved FreeBSD's dd vs GNU ddrescue

  • Thread starter Thread starter Deleted member 63539
  • Start date Start date
D

Deleted member 63539

Guest
I have the habit of using GNU ddrescue back to the time I'm still using Linux. I found even though the dd command on Linux finished, the LED light on my USB is still blinking, it means data is still being written. Using ddrescue, I could bypass Linux's caches, buffers and write directly to the device:

Code:
ddrescue -D -f test.img /dev/sdb1

Does the FreeBSD's dd has the same behavior as Linux's dd? GNU's ddrescue needs to be installed from pkg and sometimes I forgot to install it. The system's dd is always there, so that's it advantage. How could I archive the same thing with it without using ddrescue? Thanks.

p/s: my current USB doesn't have a LED light so I can't determine if data still being written or not.
 
The /dev/sd* device nodes are block devices on Linux, so they’re subject to caching.
On FreeBSD, the corresponding devices are not block devices, but “raw” character devices. So, when dd(1) closes the device and terminates, all data should be stored on the physical device.
 
The /dev/sd* device nodes are block devices on Linux, so they’re subject to caching.
On FreeBSD, the corresponding devices are not block devices, but “raw” character devices. So, when dd(1) closes the device and terminates, all data should be stored on the physical device.
So ada1 or da0 are not subject to caching?
 
So ada1 or da0 are not subject to caching?
That’s correct. These are “raw” devices a.k.a. character devices. There is no caching. As I said before, as soon as the dd(1) command finishes, the data is stored on the physical device. In the case of removable media (such as a USB stick), you can safely remove it.
 
Back
Top