-3

Assuming that I have the correct input file and the correct output file in the dd command. Is there a risk that if something change in the input file during the process it could corrupt the input file or only the output file?

Giacomo1968
  • 55,001
J.C
  • 105
  • Not by default. Howver I think there's options in dd that e.g. pads the input blocks with zeroes or so when e.g. the input block size is set to a smaller value than the output block size. Also if you are talking about dumping drive to drive (instead of file to file), it won't make much sense if the drives have different logical block sizes. – Tom Yan Dec 22 '22 at 06:22
  • "Can a dd command destroy?" means dd is the cause; "if something changes in the input file" allows anything to be the cause. What is your concern? Additionally "corrupt file" may mean "a file broken on the filesystem level or such (like a block device that develops a hardware error)" or "a file perfectly fine on the filesystem level, but with content different than what you expect". Please [edit] and clarify. – Kamil Maciorowski Dec 22 '22 at 06:28

1 Answers1

2

Nope.

That is not possible.

The input file is read from and the output file is written to. The only risk of corruption comes from the file being written to.

Giacomo1968
  • 55,001