is this the right command?

Discussion in 'Mac Programming' started by Mindcrime13, Aug 8, 2007.

  1. macrumors member

    Joined:
    Jun 12, 2007
    #1
    well, im trying some stuff in my computer and wanted to make sure of something,

    sudo rm -rf / is the command in terminal that would erase my whole computer leaving only the OS right? and is that how it should be written?

    thanks
     
  2. Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #2
    I believe that's correct but why would you want to do that? And if so why not just format your hard drive instead?
     
  3. Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #3
    That command will just hose your system. Don't run it.

    sudo = basically giving it root privileges.
    rm = remove
    r= recursive
    f = force
    / = root of the drive.

    So it'll go through your harddrive deleting everything as well as anything attached to it.
     
  4. thread starter macrumors member

    Joined:
    Jun 12, 2007
    #4
    cuz theres some info in my computer that i really dont want anyone to or try see or to get with a recovery tool
     
  5. thread starter macrumors member

    Joined:
    Jun 12, 2007
    #5
    is there something similar like that but to apply it in a external hard drive?
     
  6. Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #6
    Just open up Disk Utility in Utilities. Select the external drive and select the erase option. In there you can choose some option going all the way up to 35 passes.

    If you want to do this to the internal drive you'll have to boot from the install DVD and use disk utility there.
     
  7. thread starter macrumors member

    Joined:
    Jun 12, 2007
    #7
    and with the disk utility, theres no way no one will recover anything?
     
  8. Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #8
    Well if you really want to be sure I'd melt the drives down.

    With 35 passes it is pretty safe to assume that no general person can recover the files, now the NSA that is a different matter.
     
  9. Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #9
    [​IMG]

    Incidentally, Disk Utility *is* secure. sudo rm -rf just deletes the file in the standard way. It's not secure from data recovery at all, any more than just dragging the file to the trash.
     
  10. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #10
    You can just put it in the trash and choose secure empty trash...
     
  11. thread starter macrumors member

    Joined:
    Jun 12, 2007
    #11
    hahah well its no NSA material LOL, but its some stuff i;ve been writing in python, and a friend of mine wants tog et it and call it his, and that freaks em out a little,
     
  12. Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #12
    wow you must have pretty bad friend if you are going down this route.
     
  13. thread starter macrumors member

    Joined:
    Jun 12, 2007
    #13
    yea its a love-hate relationship
     
  14. Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #14
    In that case don't erase your whole machine. Just delete the python files and in disk utility you can choose to erase your free hard drive space. You can choose the multiple pass option. Honestly I wouldn't bother going over it more than 1 or 2 times... any more than that and your friend is probably just crazy and I would seek new friends.
     
  15. thread starter macrumors member

    Joined:
    Jun 12, 2007
    #15
    hm i dint know that about deleting the free space! thanks, ill do that,:apple::D
     

Share This Page