delete stubborn files?

Discussion in 'Mac Apps and Mac App Store' started by macrlz9, Feb 26, 2005.

  1. macrlz9 macrumors 6502

    macrlz9

    Joined:
    Dec 6, 2003
    Location:
    Long Island, NY
    #1
    i'm sure this has been covered before as i have seen it posted somewhere but i can not remember how to delete a file using the terminal that will not delete! i can put it in the trash but it won't empty the trash, i can restart adn still it won't delete, i can change the permissions and still no luck... .the files name is "Stuff" and it's on my desktop so if anyone knows what i need to type in the terminal to delete it i think the path would be Macintosh HD>Users>Anthony>Desktop>Stuff but any help would be greatly appreciated as the full trash can looks messy and is driving me nuts!!!!!! thanks :D
     
  2. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #2
    Open Terminal.

    Type "sudo rm -f " (no quotes, don't hit return yet, but note the trailing space).

    In Finder, click on the offending file and drag it to the Terminal window - the full path should fill in after what you'd typed before.

    Verify that it's the correct file, then hit enter. You'll be asked for your admin password. Enter it. The file should go away. Post back if it doesn't.

    Note: try the above first without the "sudo ", and that might also work. It's a bit safer, but you might need the sudo ("super-user do").
     
  3. macrlz9 thread starter macrumors 6502

    macrlz9

    Joined:
    Dec 6, 2003
    Location:
    Long Island, NY
    #3
    well it won't work cuz it's a directory, and there are a lot of files in that directory, i tried deleting them individually but none of the files would delete like normal... how do i delete a whole directory?
     
  4. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #4
    Change the "-f" to "-rf". And be sure there's a space afterwards:

    sudo rm -rf /the/complete/path/to/the/folder
     
  5. macrlz9 thread starter macrumors 6502

    macrlz9

    Joined:
    Dec 6, 2003
    Location:
    Long Island, NY
    #5
    wow that worked!!! thanks so much!
     
  6. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #6
    No problem - glad it helped! Just be really, really careful with deleting files using Terminal.
     

Share This Page