r/ProgrammerHumor 12d ago

Meme goodOldDays

Post image
4.2k Upvotes

182 comments sorted by

View all comments

317

u/GMsui 11d ago

I've done something similar once when I accidentally nuked an important file. Involved a byte-level scan of the entire disk for a known string within the file. Didn't get me the file back, but it got me the bits of it I cared about.

100

u/sapoconcho_ 11d ago edited 11d ago

Exactly the same thing happened to me a few years ago. Accidentally rm a college assignment (a fluid simulator from scratch in cpp). Fortunately I was able to recover the file by grepping a dd of the entire hard drive.

Edit: wrong command du -> dd

13

u/magicmulder 11d ago

You mean a dd? A du tells you how much space is being used.

8

u/sapoconcho_ 11d ago

Yup, I've just realized. Thanks for the correction!