I’m working on a some materials for a class wherein I’ll be teaching some young, wide-eyed Windows nerds about Linux and we’re including a section we’re calling “foot guns”. Basically it’s ways you might shoot yourself in the foot while meddling with your newfound Linux powers.

I’ve got the usual forgetting the . in lines like this:

$ rm -rf ./bin

As well as a bunch of other fun stories like that one time I mounted my Linux home folder into my Windows machine, forgot I did that, then deleted a parent folder.

You know, the war stories.

Tell me yours. I wanna share your mistakes so that they can learn from them.

Fun (?) side note: somehow, my entire ${HOME}/projects folder has been deleted like… just now, and I have no idea how it happened. I may have a terrible new story to add if I figure it out.

  • @FigMcLargeHuge
    link
    English
    112 months ago

    Mine falls along with the people who were distracted. Was doing two deployments for work on night and on one I need to clear a cache. As I was typing the cd command, I happened to glance at the instructions for the other deployment and for some reason my mind switched to the deployment folder. I then typed out rm -rf *, and as I hit return realized I wasn’t in the cache subdir. Blew away our prod environment and it took hours to get it all restored. The restore kept asking the guy to go pull tape #xxx. It was nerve wracking because depending on the tape, there was a chance it was moved offsite. Got it all restored and turned it back on, and then had to start back from the beginning since the backup was from the night before. The other people doing deployments weren’t too happy, but I owned up immediately and we ended up changing the procedure. First, the cache clearing was done via a script after that, and I won my argument about not having to do two deployments simultaneously!