Emptying trash for only certain files?
2. When a USB jump drive is plugged in, is there a way to empty the trash for just those files and not for the Mac?
Thanks.
Macpro, Mac OS X (10.5.1)
Macpro, Mac OS X (10.5.1)
That's what it looked like when I made it, and it worked.
What errors are you getting?
It's not giving me any errors. I right-clicked the folder and then pushed "delete now," and nothing happened.
So it is now working. Thank you very much. I figured that it was only a matter of the order of the "yes," "no" buttons. One more thing, how would I do this in applescript? I only ask because I would like to set a default button (I would like it to automatically highlight "no") and maybe, if it's not too much trouble" change the default image that it shows from the basic one with the blank paper and pencils.
Thanks so much!!!
This is a very good question. Let me try to answer your question.
1. Open "Terminal", then type
cd .Trash/
2. Then type
find . -mtime +5 -exec rm -rf {} \;
if you want to remove all the files in the Trash that are deleted more than 5 days ago. You can change the number "5" to number you like.
Typically that's mostly what I need.
Hope this helps.
Eddie
The PERFECT SOLUTION....
Thanks to Jacques Rioux and iorganutan
I know this is an old thread -
I use this script AppleScript, save it as Application :
on open these_volumes
set t_id to user ID of (system info)
repeat with i in these_volumes
if (kind of (info for i without size)) is "Volume" then
set tPath to (POSIX path of i) & ".Trashes/" & t_id
do shell script "/bin/rm -Rf " & (quoted form of tPath) & "/*"
end if
endrepeat
end open
----------------------------------------------
Drag/Drop Volume(s) on the application.
This script removes the items from your trash (user ID) folder on the volume.
if other users use the volume this script will not delete the items from their trash folder, otherwise the script would need an administrator password to do that.
----------------------------------------------
If you want to eject the volume after emptying the trash, use this script.
on open these_volumes
sett_idto user ID of (system info)
set volToEject to {}
repeatwith i in these_volumes
if (kindof (info foriwithoutsize)) is "Volume" then
set tPath to (POSIX path of i) & ".Trashes/" & t_id
do shell script "/bin/rm -Rf " & (quoted form of tPath) & "/*"
set end of volToEject to contents of i
end if
endrepeat
ifvolToEjectisnot {} thentellapplication "Finder" toejectvolToEject
end open
Discussion over.
Use the Terminal. The "Trash" is in a folder called ".Trash". Move to that folder (using the "cd" command). Type in "rm [file to delete]".
You can do all sorts of stuff with "rm", wildcards and such, as well as recursive deleting
Dunestrider wrote:
You can do all sorts of stuff with "rm", like deleting all your files and your entire hard drive.
FIFY
,
For those who are not comfortable using the command line, there is rather an ingenious way....
First create a folder named "deleter" on desktop and in documents ( you can choose any 2 locations )
Again create an automator service accepting files and folders as input.
cd ~/Documents (or add the path to location2)mkdir deleter
save it
The run shell script action was added so that this service can be used again and again... otherwise we would have had to create the the deleter folder in documents every time before using the service.
try it out...!
I've read this thread from beginning to end and the only thing I have gained in an insight into the absurdity of human nature.
The problem is a real one, a serious one, and has yet to be taken seriously by Apple.
The most ridiculous responses I read were those that told the original poster that the trashcan was only for items you knew you wanted to get rid of.
Uh, duh, if that were true, then why would they be STORED in the trashcan instead of dumped immediately?
We have a dual OS in our house: Windows and Apple. And when it comes to user-sensibility, MS wins hands down. I delete items when I don't want the clutter. But included in those items are some of dubious nature. I'm not a hundred percent sure, but I don't want to waste time making a decision now. I don't want to search out a transition location for "not-sure-now" because that is exactly what the trash is for; otherwise it would not be keeping items. When I am finally certain about particular items, I delete them. If I've changed my mind I restore them. Simple.
Please note: Apple offers users the option to restore single or grouped items, so obviously even the engineers recognize that some items might require reconsideration. Why not also offer the reverse strategy?
Well, from "telling" its clients that you will not have access to a two button mouse or a forward delete or any other item of convenience, Apple has made clear that we customers have nothing of value to tell them.
I would truly be interested in hearing from a single ordinary customer that managed to convince Apple to change a single thing. Ever.
And, by the way, anyone know of a simple way of finding and clearing the artifacts of old apps we have removed from or updated in the system? My own guesstimate is that over 25% of fixed drive substance on our house Mac is totally superfluous (unnecessary copies of unnecessary copies of unnecessary copies of ... photos and videos that have been mishandled by novice users, and even some competent ones). But how to find these ...?
Emptying trash for only certain files?