Mac OS X and Trash File Size

Novell Cool Solutions: Tip
By Randall R. Saeks

Digg This - Slashdot This

Posted: 22 Mar 2005

Here's an OS X tip from one of our Macintosh gurus, Randy Saeks. Even though it's a bit "trashy," we think you'll like it ...


Some users authenticate via LDAP and use the network as the location for their home directory. However, at times they cannot successfully delete files that reside in their user profile.

Because of the mechanism built into OS X for moving files, the Trash is actually a hidden folder in the users account, (the .Trash folder). When the file is moved to the trash, the file is actually copied from its original location first. If there is not enough free space in the user folder, then the move will fail, and therefore the file will not actually be moved to the trash to be deleted. The actual amount of free space required to delete the file is 2x the file size.


To fix this, the .Trash folder is re-directed to local disk and removed at logout via a logoutHook.


mkdir /Users/Shared/.Trash
chmod 777 /Users/Shared/.Trash
rm -R ~/.Trash
ln -shf /Users/Shared/.Trash ~/

#Logout Hook
rm -R /Users/Shared/.Trash

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© Micro Focus