This hint enables you to turn off (and back on) moving files to Trash when deleting files, thus deleting them immediately when the trash is off.
This hint takes advantage of the fact that if the .Trashes folder in a user's home folder is not accessible, Mac OS X ignores it and displays an immediate file deletion warning like the one seen at right.
Create a service in Automator that (via the top two drop-down menus) takes no input and is available in any application. Add a single Run AppleScript action that has following contents:
on run {input, parameters}
do shell script "chown root ~/.Trash" with administrator privileges
do shell script "killall Finder"
return input
end run
Save the service as Bypass Trash. Create another service with the same properties and one AppleScript action, with the following contents:
on run {input, parameters}
do shell script "sudo chown myusername ~/.Trash" with administrator privileges
return input
end run
Replace myusername with your short user name as defined in the Accounts System Preferences panel. Save this one as Enable Trash.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20100209053826395