Posts tagged: rm

An important lesson in saving…

…and backing up your saves in case you accidentally delete the copy you are working with.

Let this be a lesson to me. I was working tonight on the lottery simulation. I wrote some more code introducing new plotted data. All was well.

I thought maybe I’d take a break. I loaded up “20.000 Light Years in Space” and played a couple rounds of the beginner level.

I figured I’d had enough fun, it was now time to package up my hard work and post to the science page. I thought to myself, there’s no sense in tarring up all the results files, there’s a couple hundred of those and they are taking up way too much space!

Lesson: The ‘rm’ command is unforgiving.

I “permanently” deleted some of the new code I had written.

I know I could dip into the computer forensics field and recover my lost file, but it’s only 30 minutes of code I lost. 30 minutes is still an inconvenience. So be warned! Make sure you are rm`ing what you mean to rm.

I’m re-writing it now and it should be posted soon. I’ll update this post when it is.

[Edit]

I’ve fixed my mistake, the new code is better than it was before I erased it all. And now there are 979 new and updated files in the Lotto section. Perl really makes it easy to generate stuff. 979 files by hand? I wouldn’t bother.

Staypressed theme by Themocracy