So in the morning today, I played with some game engines and libraries, one of them is Orx.

When I `git clone` the repo and setup for it, the doc says that I can use `init.sh` to setup my Orx game project. Sweet!

When I run it, the program ask me for the path, I thought that it will allow me to create a game project at any path. So I entered `~/Projects/Games/my-orx-game`.

After that, it asked for some other stuff and I just skip though it.

Then, I went to `~/Projects/Games` and use `ls` to check my game project, but I don't see anything. I went back to where I installed Orx and realized that it creates a game project __in__ the directory that it was installed. Now, there's a directory called `~` inside the directory. I remove it using `rm -rf ~`, but Linux stopped me with `Premission denied`. Then for some stupid reason, I typed `sudo rm -rf ~` without thinking. After doing that line, my fish shell comes to it original prompt. And I realized I fucked up.

I restarted the computer, thought that I wiped the whole OS. Luckily, it just wiped the configuration files. The softwares works completely fine. My Project files and any content in those default directories (Like `Music` and `Downloads`) are also wiped. But I don't care about them at all. At least not right now.

Now I know that I need to be more careful when typing a command in the terminal.

  • 2
    Linux peasant problems 😂
  • 0
    Nevers casually sudo rm something
  • 2
    sudo... the shittiest program ever made.

    but given to a moron it's very effective in destroying everything.
  • 1
    Everyone had deleted something by mistake, so don't feel that bad.

    And as always, don't skimp over the details. Happy hacking!
  • 0
    One time before knowing linux, i was using a mac, first time being really exposed to posix, I git access to a server and needed do delete a folder, I did not know what . Or .. was, so I did rm -rf . On the root folder.

    I saw fucking tons of lines going by, then I realized what I did, i hit ctrl C then mi brain interpreted what I saw, it said access denied on every line.

    Nothing happened, but I shat my pants.
    I went and grabbed a beer, looked for an article on command line basics and continued my day.
  • 0
    Yesterday I didn't read the prompt in which Git LFS asked me to discard my working copy as part of a migration and I erased a complete restructuring of the project into a monorepo of microservices. Guess it's my fault as well for not backing up, but still. That was easily in excess of 30 hours.
  • 0
    All I can say is you aren't the only one...


    BTW what's up with your permissions? You should own your home directory and most of its content.
  • 1
    @cprn I am a user, but because I'm the only user of my computer so I'm also a administrator. So that the content of my user is seperate from the home directory. And because Linux won't remove directories that has other directories, so `/home/firefly` (The directory that contains data of my username) wasn't deleted.
  • 0
    @NoOneCares and to be less snarky...

    If I remember correctly, tilde must be escaped.

    Permission denied is a bit weird...

    Tilde is a cumbersome thing. Easier to use $HOME and less cumbersome.

    $home is a variable, ~ is a character expansion - big difference.

    rm -r \f would be correct.
  • 0
    @IntrusionCM Honestly, I don't understand what you mean, `rm -rf ~` works just fine. Did you try it? ;)
  • 0
    @cprn sigh. maybe use that brain of yours and figure out that the user wanted to deleted a folder named tilde.
  • 0
    @IntrusionCM LOL, I'm trolling, man. You have a very German sense of humour. Not a laughing matter.
  • 1
    @cprn nah. Less german sense of humour, more being terribly annoyed and not drunk enough (yet) for this level of humour
Add Comment