202
linuxxx
6y

Was doing some work on a server today and removing loads of stuff.

rm -rf file1
Etc
Etc
Etc

Went into another directory with very important data. Wanted to do ls -la but my fingers went:
rm -rf ./
.
.
*1 milisecond later*
😢
FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
*VIGOROUSLY CHECKS FILES*

Everything still there πŸ˜…

Comments
  • 77
    Our teacher used to say: "This happens when the fingers are faster than the brain, so always take a step back and think what you're doing"

    Yes, he is the closest thing to a system administrator-stereotype you can imagine
  • 35
    Having rm -rf pause for like 2s when called onto a directory would sometimes save people's days, I guess - phew. 😌
  • 18
    I've never used rn -rf, so excuse me if I'm saying something stupid.

    But wouldn't it make sense to add a confirmation to rm -rf? To prevent accidentally fucking yourself?
  • 44
    @Stuxnet you remove confirmations when you use -f. You explicitly say remove what I specified, I don't give a fuck what it takes, just remove it, don't bother me with it..
  • 4
    I alias rm to rm -vi for just this reason. If I ever get annoyed with it I just use \rm -fr, but then at least I'm being explicit.

    Though that isn't much help on a server πŸ˜”
  • 17
    Once I was shift-deleting some useless files using the GUI, but didn't realise my pr0n directory was also selected.

    Sadly, Linux is too fast.
  • 34
    alias rm='sleep 20 && rm'

    Works for me 😏
  • 16
    @Stuxnet confirmations are useless if you just learn to pass them automatically
  • 20
    I once had a porn folder, saved as Old_Data. Was once cleaning my laptop and did rm -rf on it... A few weeks later, I had nothing to wank on!! Then it him me!
  • 0
    @linuxxx ... how is goes? backup for pussy's? wanna say at least u managed to save it. and ./ especially :D
  • 5
    @kLue Oh no all our servers are backupped several times a day but restoring can take a little and that was time I didn't have ;)
  • 0
    @linuxxx c'mon there is price for ADG and it's costs not everyone is willing to pay. also prod change from your tmux? :D c'mon @linuxxx u can do better
  • 4
    @kLue ADG? And yeah, as a Linux engineer at a hosting company, I kind of have to work with live servers.

    As for terminals I use Terminator.
  • 0
    @linuxxx fair enough, i feel u bro. real world is not that ideal as active data guard (oracle db HA) well, it is how it is ;)
  • 2
    @nin0x03 zsh (and I assume other shells probably) is cautious enough to ask, "are you sure?" when running `rm -rf` on a dir containing several files. It sometimes gets annoying, but it's saved me a couple of times. There's a shell opt to bypass this check too however, but I use that sparingly.
  • 5
    @silverstar 20 secs?? That's like an eternity! 😁
  • 1
    @verboze yes because I have an eternity to save my files....
    Though I never had to stop the command....
  • 1
    Remind me not to allow you to check my server, don't want you to clear my HDD πŸ˜›πŸ˜‚πŸ˜‚πŸ˜‚
  • 4
    I did the same but with a symbolic link haha, what should be 1ms was taking more than 5 seconds when it stroke me that I was removing the actual 40GB folder ... Well.. At least had all on backup :)
  • 2
    @silverstar yeah, but then when you're sure, you have to wait 20 seconds. Maybe just a y/n confirmation at the start (if you want/have to use -f)
  • 3
    Do you know a tool called extundelete?
    It saved my ass several timesπŸ˜…
  • 1
    @MrJimmy if you are fast enough yes
    If you reboot, you're fucked
  • 1
    The problem with conformations is that you confirm them faster than you can think, too. Happened to me a couple of times, too.
  • 0
    Did this in the first two weeks on my work computer... A mac.... Caught it too late tho... Lots of missing files.... Fonts missing on restart ... Just properly fucked
  • 0
    @Stuxnet the f stands for FORCE. It’s exactly the definition of an argument that bypasses confirmation
  • 1
    That happened to me once, i was in AWS instance console. and... 😒
  • 1
    Every time I use rm rf I pause like 1 full minute. Check everything. Have a mini TIA, heart attack then press enter. Another heart attack press ls whew ok.

    More adrenaline than any sport you could do especially on production servers, live, during the middle of the work day.
  • 0
    @AlpineLinnix
    That happened to me with /etc
    It was a server, that I shared with some friends at school ^^
  • 0
    Now I have a script aliased to rm that lists the files and prompt me one more timeπŸ˜…
Add Comment