Question about "forcing" trash to empty.

Discussion in 'Mac Help/Tips' started by DakotaGuy, Feb 22, 2003.

  1. DakotaGuy macrumors 68040

    DakotaGuy

    Joined:
    Jan 14, 2002
    Location:
    South Dakota, USA
    #1
    Okay maybe this has came up before, and if it has I am sorry. I love Jaguar and OSX, but ever since I went away from OS9, there is a weird thing about an item "hanging" up in the trash every now and then and the Finder refuses to empty it. It will say "The operation cannot be completed because "x" item is in use." Now sometimes I just have to make sure an Application using the file is closed and I can understand that, but once in awhile there is nothing I can do, short of booting into OS9 and finding the file and then trashing it. Restarting the Finder, even the computer will not take the file out of use.

    I was wondering first off if I am in fact the only person with this problem and second is there any terminal command to force the trash to empty in these circumstances. I just find it so time consuming to have to re-boot into 9 to fix something in X. There has to be another way or I would not want one of the new Macs that boot only into OSX. Thanks.
     
  2. rainman::|:| macrumors 603

    rainman::|:|

    Joined:
    Feb 2, 2002
    Location:
    iowa
    #2
    you hafta type ... uh...
    rm -fR .Trash

    when you're in your home directory. i think that's right-- i can never remember the command for deleting a folder that's not empty. All you need to do is remove the .Trash folder from the command line, and everything in it is gone-- then, when you put something in the trash again, a new .Trash folder is created.

    actually, you want might someone to confirm that so you don't do something bad to your system...

    :)
    pnw
     
  3. FredAkbar macrumors 6502a

    FredAkbar

    Joined:
    Jan 18, 2003
    Location:
    Santa Barbara, CA
    #3
    If what Paul said about the new Trash folder being created is correct, then that should work. Personally, I would type "rm -r ~/.Trash/*" (without the quotes). Because of that asterisk at the end, this removes all files in your trash can.

    --Fred
     
  4. rainman::|:| macrumors 603

    rainman::|:|

    Joined:
    Feb 2, 2002
    Location:
    iowa
    #4
    we're both correct to a point, rm -r does delete everything in the directory, you don't need the -f because it's implied and you don't need the asterisk because of -r...

    plus i'm just not big on absolute pathnames :)

    pnw
     
  5. irmongoose macrumors 68030

    irmongoose

    Joined:
    Dec 3, 2001
    Location:
    Sometimes Tokyo, sometimes California
    #5
    Use Trash It to force empty the trash.

    I prefer GUI. Guess it's just a personal thing.




    irmongoose
     
  6. rainman::|:| macrumors 603

    rainman::|:|

    Joined:
    Feb 2, 2002
    Location:
    iowa
    #6
    oh sure, go the easy route...

    :):D

    pnw
     
  7. DakotaGuy thread starter macrumors 68040

    DakotaGuy

    Joined:
    Jan 14, 2002
    Location:
    South Dakota, USA
    #7
    Thanks everyone for the help. I tried it and it worked. I also downloaded the "Trash it" program for future problems. Like I said, it does not happen very often, but once in a while and it is nice to know how to fix it. If I could I would get you all a cold beer for the help. (or whatever you prefer!)
     

Share This Page