Question about sudo rm rf /

Discussion in 'macOS' started by Triangle Man, Apr 6, 2014.

  1. Triangle Man macrumors member

    Sep 24, 2012
    I entered the infamous sudo rm rf / into the terminal based on a suggestion from a user on the apple forums. (By the way, never do this because it will erase your system)

    However, once I noticed that all of my files started disappearing and my system was no longer responding, I aborted the command. I don't think it was done erasing my startup volume, but I obviously f'ed my system up. So here's my question. Does this command erase 1 volume at a time? I ask because my time machine drive was still connected when I ran the command, but I don't know if anything would've gotten erased from that since I stopped the command before my startup disk was empty.

    So does that command erase 1 volume, then move onto the next and the next until they're all gone? If so, then I think I might still be able to use my time machine drive to restore all of my files.
  2. Weaselboy Moderator


    Staff Member

    Jan 23, 2005
    It would only erase the volume you ran it from. You should be able to option key boot to your TM disk and restore.
  3. Triangle Man thread starter macrumors member

    Sep 24, 2012
    I was under the impression that / meant the computer and all drives connected to it.

    Well that gives me hope now. Thank you weaselboy.
  4. mojolicious macrumors 68000


    Mar 18, 2014
    Sarf London
    Heh, this reminds me of del star dot starring my boss's PC about 25 years ago. Was trying to delete a floppy, but forgot to change from the C prompt...
  5. Triangle Man thread starter macrumors member

    Sep 24, 2012
    Well guys, I'm back! My Mac successfully restored from Time Machine and everything seems to be working great. So glad I backed up.
  6. mfram macrumors 65816

    Jan 23, 2010
    San Diego, CA USA
    For the record, if your Time Machine backup drive were mounted and you waited long enough then the 'rm -rf /' would have deleted everything on that drive as well. So either it wasn't mounted or you stopped it soon enough.
  7. sjinsjca macrumors 68020


    Oct 30, 2008
    Glad you recovered your system.

    Now you need to hunt that guy down and make him wish he'd never been born.

Share This Page