Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Man accidentally 'deletes his entire company' with one line of bad code - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Man accidentally 'deletes his entire company' with one line of bad code

2

Comments

  • nepsneps Member

    It's been hundreds of thousands of years since some caveman realized that speed and attention to detail are inversely proportional to each other.

    Why are people still taking shortcuts that carry an small, acceptable degree of risk, then blaming the system for allowing them to make the inevitable human error?

    Thanked by 2jar Ole_Juul
  • ValdVald Member

    @deadbeef

    please stop man you sound ever more retarded with your every new post

  • ValdVald Member

    neps said: It's been hundreds of thousands of years since some caveman realized that speed and attention to detail are inversely proportional to each other.

    Why are people still taking shortcuts that carry an small, acceptable degree of risk, then blaming the system for allowing them to make the inevitable human error?

    so you are basically saying that when and only if, i do rm rf /, i get a warning and a confirmation will slow down the system?

    jesus... you and deadbeef sound like little children

  • @Vald said:
    deadbeef

    please stop man

    You'll have to beg - or install Windows, whatever comes first.

    you sound ever more retarded with your every new post

    Happy to be of service.

    Thanked by 1Ole_Juul
  • jarjar Patron Provider, Top Host, Veteran
    edited April 2016

    @Vald

    -f, --force
    ignore nonexistent files, never prompt

    Why are you specifically demanding that the system not prompt you for things and then getting upset that it doesn't prompt you? Wasn't hard to figure out what it did...

    http://linux.die.net/man/1/rm

    Because you're a troll, that's why. I give you 8/10, good troll actually.

    Thanked by 1Ole_Juul
  • ValdVald Member

  • ValdVald Member
    edited April 2016

    jarland said: Why are you specifically demanding that the system not prompt you for things and then getting upset that it doesn't prompt you? Wasn't hard to figure out what it did...

    i was pm'd by someone and i now know why rm -rf / exists

    if you are doing something illegal and you get raided, its very fast to type it before they kick the door down.

    Thanked by 1zafouhar
  • ricardoricardo Member
    edited April 2016

    Vald said: if you are doing something illegal and you get raided, its very fast to type it before they kick the door down.

    That wouldn't be effective. The disk needs written to several times over. rm -rf just removes inodes from the 'index of files on the disk that the OS uses to reference the physical location of the data'... the data is still physically there, so anyone with experience of data recovery would have something to salvage.

    The reason people think the story is a trolling session is because he does something with a tool called dd that would remove any salvageable data physically from disk, seemingly on purpose.

    Thanked by 1k0nsl
  • ATHKATHK Member

    @Vald said:
    if you are doing something illegal and you get raided, its very fast to type it before they kick the door down.

    That is the only use I can see for rm -rf / wiping the entire drive, although slower, it would probably be better to write 1s and 0s to the drive..

  • raindog308raindog308 Administrator, Veteran

    Vald said: Linux is not only for those that are running a hosting company, i just use it for development. If you are saying that it should be made as hard as possible so only a handful of people are allowed to use then i dont see any point here.

    One of the most user-friendly OS on the planet allows you do do rm -rf: Mac OSX. Sure, your usual desktop user drags to a trash can, etc. but normal unix is there underneath with all its destructive potential.

  • k0nslk0nsl Member

    @Vald:

    If you're the same person as the guy in the news article, how about confirming it by sending a tweet on your twitter? I somehow doubt you're the same guy. But who knows, I could be wrong...

  • raindog308raindog308 Administrator, Veteran

    jarland said: There is! You used a flag that was designed to override it! You don't just accidentally fall into "rm -rf /" you ran it because someone told you to and you trusted them, when you clearly should not have.

    This.

    @Vald to nuke your OS you need to do this:

    1. Su(do) to root, which requires entering the root password, or having configured (as root) such that you enter your own password.

    2. Setting the recursive flag (-r)

    3. Setting the "don't confirm" flag (-f)

    4. Pointing the command at the root filesystem

    So you've bypassed four safeguards and complain there isn't a fifth?

    Thanked by 3Ole_Juul ricardo jar
  • Ole_JuulOle_Juul Member
    edited April 2016

    5 - If your name is Vald, these aren't the droids you're looking for.

  • ValdVald Member

    @raindog308 thats not the point, its the fact that people are defending it for no reason

    accidents do happen, and the command above can only do harm to the system, so i was just trying to mock some sense out of it.

    @k0nsl dont be funny, actually.. you can

  • n1kkon1kko Member
    edited April 2016

    Who stores backups on the same disk anyway... Dumb ass!

  • @Pandy said:

    Well I can tell you that I had the same mistake. but I was trying to do a rm -rf ./*

    Just because I got distracted I didn't type the damn dot "."

    So it was a bad rm -rf /*

    Is not because someone wants to do it, bad thigns happens :/

    Thanked by 1Vald
  • k0nslk0nsl Member

    Oh, I must have misunderstood you earlier in your reply to me; it seemed as if you were this chicken masala guy mentioned in the news article.

    Sorry for the confusion.

    @Vald said:
    k0nsl dont be funny, actually.. you can

  • jarjar Patron Provider, Top Host, Veteran
    edited April 2016

    Vald said: defending it for no reason

    It's a bit more complicated than that. I have no workflow that involves running rm -rf /. However, I understand that Linux is a very powerful operating system that is used for so many things beyond my comprehension, things far beyond my set of skills or hobbies. Instead, I admit that I do not know everything and as a result I desire to see base OS functionality remain in place, knowing that others are doing many many things that I could not understand.

    I certainly would not advocate removing confirmation override flags from base OS functions simply because of one misuse case, while not understanding the millions (or more) legitimate use cases for the OS.

    Just because I don't have a legitimate use case for it, that doesn't even come close to implying that no one else does. However, I'm not that far from a use case that involves using a flag to halt confirmations. A bash script that makes new backups and removes old ones on a cron would instantly be a use case for me, it just so happens that right now I'm not using any custom bash script backup cron jobs that work in such a way.

    Keep in mind that, again, "rm -rf /" is not a single entity. You're not going to type "r" and hit tab to autocomplete to that. You're using two sub functions of a function and then defining a path.

  • ValdVald Member

    @k0nsl no worries :)

  • AbdussamadAbdussamad Member
    edited April 2016

    globalRegisters said: One thing I will never understand is why people keep backups mounted or connected all the time.

    n1kko said: Who stores backups on the same disk anyway... Dumb ass!

    It was a backup script

    All servers got deleted and the offsite backups too because the remote storage was mounted just before by the same script (that is a backup maintenance script).

  • @Abdussamad said:
    It was a backup script

    My point stands...why mount all backup options at the same time.

    Crappy script.

  • pbgbenpbgben Member, Host Rep

    Thanked by 2yomero Abdussamad
  • @Vald said:
    i hate how many people defend linux and act so ignorant.
    You should not be able to delete core system files just by typing rm -rf /
    It happened to me long time ago and i know many would suggest dont login as a root bla bla bla, but its just wrong. Root or not at least there should be a warning that you are about to delete the whole fucking system.

    How about deleting UEFI with rm?
    http://www.theregister.co.uk/2016/02/02/delete_efivars_linux/

  • AbdussamadAbdussamad Member
    edited April 2016

    globalRegisters said: My point stands...why mount all backup options at the same time.

    oh sure. i was just pointing out how the backup drives came to be erased too. he made a series of mistakes that led to this.

    Thanked by 1globalRegisters
  • MaouniqueMaounique Host Rep, Veteran

    Humans make mistakes. This is a thing that will never change. Tired people make stupid mistakes.
    Imagine in a datacenter you unplug the wrong rack. It happened to us. As a result 1h+ downtime and some VMs left to repair. Simple mistake.
    Personally I check 3 times, but if i were to be doing this for a living 8 hours a day, i would probably be less careful, if the boss says turn off rack 8-A I would, without checking if it does not house our core routers by some chance and boss made a typo. Who is to be blamed? The boss who made the typo or me which I mounted the routers myself, maybe? One moment of absentmindedness, it happened.
    Surgeons leaving various things in patients or operating on the wrong limb/side are in every hospital, nuclear plant operators open personal email on the servers controlling critical processes, demolition crews demolish the wrong house, people throw in the garbage bin family jewels. In over 40 years i made many stupid mistakes, if you never did any, well, your OCD should be rechecked, it is over 9000.

    Thanked by 2Vald ricardo
  • jarjar Patron Provider, Top Host, Veteran

    Maounique said: Humans make mistakes

    I'll never forget the time I did an rsync from a temporary directory into / with the --delete flag. Yep... no one to blame but me there ;)

    Thanked by 2pbgben Licensecart
  • @Vald said:
    i hate how many people defend linux and act so ignorant.
    You should not be able to delete core system files just by typing rm -rf /

    You haven't heard about systemd efivars have you?

  • Ok so not only did he run a backup script where the variables didn't work and it ran rm -rf / he actually ran it using ansible on multiple boxes.

    Surely you'd test the script BEFORE running it on everything no?

  • @Vald said:
    jesus... you and deadbeef sound like little children

    You need to LISTEN little boy.

    if you run rm / you get a popup asking for a Y N D.

    if you run rm -rf / you don't get a pop up because you are using "flags"

    -r => Includes folders / files
    -f => FORCE (this is what is known as force overwrite) meaning it won't ask you for a "are you sure?" Yes/No/Disable

    For safety reasons when I use that command I do: rm -rf ./ that means ONLY this folder.

    Thanked by 1jar
  • dragon2611 said: Surely you'd test the script BEFORE running it on everything no?

    Of course you would, but that ruins the story.

Sign In or Register to comment.