Oops… No… WHAT HAVE I DONE??

We all have thought „Noooo! What did I do??“ in front of a computer. Admit it! You had that moment as well. We all have lost some thing digital. Really everyone. Trust me. :)

Minor things might include pressing CMD + Q for an „@“ sign when trying to write your first email in Apple Mail after switching from PC (CMD+Q quits an application immediately on Macs…) up to severe data loss.

A couple of days ago, I just sat at my computer at work. My hard disk (SSD actually) was pretty much filled up so I wanted to free up space by deleting some old files.

I began…

cd /temp
bash: cd: /temp: No such file or directory
rm *

The moment I pressed return I read the prompt message „No such file or directory“. Yes, my temp folder ist actually called „tmp“, I remebered. But wait….. (blood pressure rising at this point)

Oops…. I just deleted the contents of my home* folder!!! What did I do??? Oh nooo!!!

(*the home folder actually holds all you personal information on Linux. This is were all your documents, images, music, browsersettings, files, projects and other preferences go.)

Remember, Linux just does what you tell it to do. No questions asked. No trashcan. You are in charge. What you type will be executed. Very fast and even faster on SSD….

THANK GOD, I didn’t set the recursive flag „-r“ on rm! Therefore I only lost all files in home and not all files in all directories underneath home (which would have eradicated all of my files completely).

delete

From most of the stuff I had a backup! PHEW!

I talked about this „incident“ with other people and I found out almost everyone had their own „fat finger“ story to share. That made me curious! I’d love to hear yours in the comment section :)

Thanks,
Maurice

 

2 Gedanken zu „Oops… No… WHAT HAVE I DONE??“

  1. Haha, I made nearly exactly the same mistake like you described it, but I managed to do a lot worse. o_O

    I was modifying my system’s configuration such that /tmp would lie on a ram disk instead of my SSD. I was using a shell logged in as root (which I have not done again after this incident…). after modifying all config files, I wanted to clean the /tmp on disk before rebooting, but I did not catch my typo and neither did I pay attention to the screen. For this, I would pay…

    /$ vim /etc/fstab

    /$ cd /mtp
    mtp: No such directory
    [i]I did not realise this.[/i]
    /$ rm -rf *
    [i]After two seconds, I wonder why it takes so long, and then understand what’s going on.[/i]
    ^C^C^C^C^C
    /$
    [i]Oh noes!! What have I done?! How much is already gone after 2s of full speed SSD file deletion?[/i]
    /$ ls
    ls: Command not found
    /$

    Uh-oh. /o\
    So in just 2 secs, all of /boot, /bin and lots of /etc where already gone.
    I made a full system backup the night before, using a tool whose name I forgot. So it wasn’t so bad.
    And that’s when I realised that this tool does not correctly restore permissions, rendering the restored system unbootable and non-functional. *facepalm*

    So in the end, this one-second blunder cost me a full day of trying to resurrecting that backup and manually restoring permissions, and I had finally resorted to re-installing Linux Mint over the restored backup with the broken permissions. That was a day lost!

    I wonder which other stories people will „confess“ ;)

  2. I was working on a customer’s website. I was setting up a second server in China and had to transfer all live data to that server. The connection was a little unstable so the transfers were a little unstable and I had to delete the incomplete data and retry.

    Oh well, I had two windows open, one for the new server and one for the productive server. Now guess from which window I deleted everything.

    I wonder if there is a firefox extension that styles the window differently, depending on the URL. And command line prompts should be visually different, too.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.