|
|
Terminal.app
If you're comfortable with the Terminal.app there's an even quicker way to do this.
rm -r ~/.Trash/*
That's only for trash on your local disk though. Trash on other disks would need to be done with something such as... rm -r /Volumes/FirewireDisk/.Trash/*
Be careful with that command though! It's widely known to cause big headaches (ie: important data loss) if typed wrong!
Terminal.app (and rm)
This gets rid of the file's directory entry - but only gets rid of the actual file if nothing has it open. This may be what you want (trash will empty now), but don't expect to always get your disk space back right away. If the file is really open it is only deleted when it is closed (see "man unlink" for details) .
To work out if something has it open, you can probably use the "ls -i" command to get the inode of the file and then use "lsof" to find what has it open. For example
> cd .Trash > ls -i filename 2808535 filename > lsof | grep 2808535 This should tell you the name of the program with open. (There are many other options to lsof which may help - I haven't had a good look at them, but beware that since you trashed the file, its name may have changed - I don't know if lsof reports the original file name or the current file name) ---
Emptying stubborn trash with Terminal.app
You want to put a sudo in front of both of those - the whole reason the trash won't empty is because some process has the trashed file(s) open. An ordinary user can't override these other processes' need for the trashed file, but the superuser can. So: sudo rm -r ~/.Trash/* [password requested and entered] and/or sudo rm -r /Volumes/MountedVolumeName/.Trashes/* [password requested and entered] Oh, and notice that the volume-wide trash for volumes (both mounted in the /Volumes directory, and the boot volume, /) is .Trashes, not .Trash. Only user home directories use .Trash as the trash directory. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|