OSX Trash

Discussion in 'Mac Help/Tips' started by Ensign Paris, Mar 12, 2002.

  1. macrumors 68000

    Ensign Paris

    Joined:
    Nov 4, 2001
    Location:
    Europe
    #1
    Hi

    Can anybody give me a quick way to empty the trash from the terminal?

    I have about 7000 files which take about 10gb of disk space up on my pb and I want to get rid of them, but I do not own them!

    I guess the terminal can do this (Root didn't work!)

    TIA

    Ensign
     
  2. Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #2
    I don't know abou the Terminal but there's a shareware/freeware app called BatChmod (look on versiontracker) that has a "Force Empty Trash" command built in. Hope this helps!
     
  3. macrumors member

    Joined:
    Jan 10, 2002
    #3
    Just switch to root you will own all and should be able to delete everything from the trash. If you are not confortable with being root, just empty the trash and logout.
     
  4. macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #4
    Its not too hard...

    Just cd to the .Trashes directory on the volume you want to empty the trash from. The directory is on the root level for the volume that OS X is installed on. In the .Trashes directory you should see user folders named by the user id number (501, 502, etc). If you are the only user, you'll only see one. cd into the numbered directory (ls to make sure its the right directory--look for the stuff you have to delete) and then sudo rm everything. Like this:

    %cd /.Trashes
    %ls
    501/
    502/
    503/
    %cd 501
    %ls
    junk.txt
    junkdir/
    %sudo rm -rf *

    Be careful with the sudo rm command as you can trash your system with it. To be safe close the terminal window after the command has successfully completed.

    I'm typing this from memory, BTW.

    Matthew
     
  5. thread starter macrumors 68000

    Ensign Paris

    Joined:
    Nov 4, 2001
    Location:
    Europe
    #5
    I am happy with the root user name, infact my life would be hell without it (I love fiddling with the OS) but the Root does not list the trash for my admin user name.

    Thanks for everyones help!

    Ensign
     

Share This Page