What does the conv-fdatasync do in dd command in linux?
Asked Answered
F

1

6

I am very new to Linux. I was reading this article on using the dd command to burn ISOs to USB drives. I didn't understand this section on fdatasync. https://www.howtogeek.com/414574/how-to-burn-an-iso-file-to-a-usb-drive-in-linux/

conv=fdatasync: The conv parameter dictates how dd converts the input file as it is written to the output device. dd uses kernel disk caching when it writes to the USB drive. The fdatasync modifier ensure the write buffers are flushed correctly and completely before the creation process is flagged as having finished.

I don't understand what they mean by write buffers and flushing. Not only that, but I think that they mean that instead of caching the information for writing, they immediately transfer the buffer to the USB drive. But I could be wrong.

Flavourful answered 27/6, 2021 at 11:30 Comment(1)
Not really a programming question. linux.die.net/man/2/fdatasyncCommissure
T
5

Keep in mind that some operations are stored in RAM and postponed to be later written on the disk, so with this flag you tell the dd to write everything on the disk. So you have a complete ISO

Troupe answered 28/6, 2021 at 5:55 Comment(1)
If the USB / target would be unmourned clean, then fdatasync wouldn’t change anything, right?Udell

© 2022 - 2024 — McMap. All rights reserved.