How not to start your Friday

$ sudo vim /etc/hosts

Enter some lovely vimlicious commands on the file, and then proceed with the accidental “:w ~”. That erroneous command, will unfortunately write the file as “~” to your current working directory.

So we obviously don’t want that silly “~” file in our lovely clean directory so we’ll go ahead and remove it.

Now watch this:

$ rm ~
rm: cannot remove `~': Is a directory

That doesn’t make sense, it should be a file. Oh well. “I don’t have to stuff around.” so I’ll just:

$ rm -rf ~

And then it slowly dawns….NOO!


And there you have it. A recursive delete on ALL my files in my home directory. Nice. I’ll spend the morning rebuilding my Dev environment.

No related posts.


  1. LOL, that’s awesome bro!

    For this one, you don’t earn The Trophy… since you only screwed yourself!

    Happy Friday!

  2. kevins

    You mean the trophy that already in my possession? Holy-moley. What a week.

  3. James

    Too bad that we cannot simulate recursive trophy awards.

  4. This was a pretty good recursive Trophy Acquisition Exercise…

  5. So – there I was…running out of memory…..a quick look while everyone is shouting for support showed an empty 10gig partition on my drive….handy I thought…

    Let’s make 10gig of swap and ride it out

    mkswap /dev/sda

    cd /home
    No such file or directory…….SAY WHAT ?!?

    mount reveals what happened…..

    /dev/sda *was* /


  6. LMAO, nice one Pieter. I’d laugh harder if you weren’t our lead sysadmin.


  7. Show me an admin without a story like this and I will show you an admin that hasn’t worked in the real world :D

Leave a Reply