Accidentally dd'ed to a non-existent directory

Yesterday late at night I was preparing a live USB. I used dd to write the image file to my sdb partition, but in a fast copy-paste I ended up setting of=sdb instead of of=/dev/sdb .
I noticed (thanks to Thunar’s bottom left indicator for remaining space available) that my SSD storage was decreasing, and managed to abort the terminal after only 1 GB was “written” (as inferred from the decrease in space, and declared by dd after I Ctrl+C'ed).

This morning I have rebooted my system and everything seemed to be working fine, and gparted and fdisk do not highlight any evident anomaly in the partitions.

Do I have reasons to fear I may have corrupted my data?
Is anyone aware of what happens when dd is given a non-existent destination - as “sdb”, in my case?

Thank you in advance!

This should have created a file named sdb in your current working directory.
You can safely delete it, no data got corrupted.

6 Likes

I have just verified its presence, and got rid of it! Thank you very much, this was a great relief for me!!

1 Like

Okay, I believe that makes the count of people who have done that go to approx 6,217,837. :lying_face:

Pudge

4 Likes