34

I typed in dd in bash and ran it without double checking. Will this do anything to my system?

I just executed dd by itself. Was trying to backup a Raspberry Pi device, which I managed to do using dd. Just stupidly input and execute dd by itself afterwards.

New contributor
Tom Tat is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
61

The dd command by default will copy stdin to stdout. You either have to end it with Ctrl+D or kill it with Ctrl+C.

So, it would not have made any harm, unless you have redirected its input or output.

See http://manpages.ubuntu.com/manpages/latest/en/man1/dd.1.html for more information.

  • does closing console kill dd command? – Tom Tat Dec 2 at 19:25
  • 1
    Yes. Kills the shell and any commands running. – FedonKadifeli Dec 2 at 19:26
5

dd stands for data dump. Called so, because it only dumps the data passed to it without any processing. Without an if (input file) parameter (or being "piped"), it would wait for some input that is terminated at the end with EOT (end of transmission) which you would do with CTRL + D. You could also CTRL + C (abort the input) and no data will be written. That being said, if you don't give it any input (it would simply write nothing), or abort the command before you ended the input, there surely can't be any harm done.

On another note, if you didn't supply an of (output file) parameter (or "pipe" it to some other command afterwards), it will only print the input data.

So, it is safe to say that it didn't change anything on your system.

You could also read the manual with man dd, as well.

New contributor
GGets is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 5
    Actually, dd can do a lot of processing to the data passed to it. It can convert lower to upper case or vice versa, or between ASCII and EBCDIC (including an alternate EBCDIC that IBM used), it can "block" and "unblock" data, by adding or removing blank-space or NUL padding for newline-terminated records, it can swap the order of byte pairs (useful for 16-bit little-to-big-endian or vice versa conversions). – Monty Harder Dec 4 at 23:27
  • Sometimes dd stands for "data destroyer". In particular when one writes an image to a wrong device. – Kamil Maciorowski Dec 5 at 18:32

Your Answer

Tom Tat is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.