Deleting stuck files

Discussion in 'Mac Help/Tips' started by gaomay, Dec 7, 2002.

  1. gaomay macrumors regular

    Joined:
    May 28, 2002
    Location:
    Scotland, UK
    #1
    I know there's a way to delete stuck files using the terminal but I'm not sure of the procedure - can anyone help?

    Thanks in advance.
     
  2. mike czech macrumors member

    Joined:
    Dec 7, 2002
    Location:
    619 SD CA
    #2
    taken from http://discussions.info.apple.com/WebX?14@12.63p1a910dSy.6@.3bbbf188/0 (tip posted by Joel C.)

    1. Launch Terminal

    2.Type: sudo rm -R

    3. Press the space bar once.

    4. Drag the folder/file to the Terminal window. The files pathway should show up.

    5. Press return

    6. If you're asked for a password enter it and press return.

    Worked for me every time...
     
  3. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #3
    I'm not sure what you mean by "stuck files", but if you're referring to files that the Trash can't delete, here's how:

    Use the command "rm -rf filename" to delete your .Trash file in your user directory. If you need to delete a file you don't own or have write access for, add "sudo" preceding the command: "sudo rm -rf filename"

    A word of warning..."rm -rf" is a powerful command that deletes files w/out prompting for confirmation. Make sure you know what you're doing with it, because it's easy to make a mistake and trash the wrong files.

    You might also want to check out BatChmod:
    http://versiontracker.com/moreinfo.fcgi?id=12057&db=mac

    It has a GUI based method of force emptying the trash.
     
  4. gaomay thread starter macrumors regular

    Joined:
    May 28, 2002
    Location:
    Scotland, UK
  5. Macette macrumors 6502

    Joined:
    Mar 5, 2002
    Location:
    Melbourne
    #5
    Thanks - I've been having this problem too, and have been so sick of the 'full' trash icon...

    now i feel clean again.
     
  6. King Cobra macrumors 603

    Joined:
    Mar 2, 2002
    #6
    Another technique to use, which doesn't require the Terminal, is using Root User.

    This works for a lot of other situations, and has helped me when even the -rm... didn't work.
     
  7. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #7
    That's essentially what the "sudo" command does, and avoids the pitfalls of accidentally messing something up when logged in as "root".
     
  8. kiwi_the_iwik macrumors 65816

    kiwi_the_iwik

    Joined:
    Oct 30, 2001
    Location:
    London, UK
    #8
    If you have problems/issues in dealing with the Terminal, try the excellent "Pseudo" - downloadable from VersionTracker. It lets you work with the files as administrator: No mess, no fuss - just drag-and-drop on the icon, and you're instantly in "Root".

    The other way - boot into OS9, and empty the trash...

    ;)
     

Share This Page