Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Put a file in the trash while the trash is emptying' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Put a file in the trash while the trash is emptying
Authored by: Stormchild on Jan 12, '09 04:39:24PM

This is something Apple will probably patch, so I wouldn't expect it to keep working in future OS X updates.

You can use Terminal to delete a file whenever you want. If you really want to perform two separate steps (put it in the Trash, <i>then</i> delete it), you can:

mv [file or folder] ~/.Trash

Now it's in your Trash. I expect that any files you add to the Trash while it is being emptied will not be deleted, as it would be inefficient to keep checking its contents while doing so (more likely, it just gets a list of what's in it, and proceeds to delete everything on that list), but I haven't tested this, so don't try it with anything you're not sure you want to delete.

That said, if you're already in Terminal, and you're sure you want to delete the file(s), you don't even need to move them to the Trash first; you can simply delete them in one step:

rm [file]
-or-
rm -rf [folder]



[ Reply to This | # ]
10.5: Put a file in the trash while the trash is emptying
Authored by: jeremyp on Jan 13, '09 04:39:00PM

As the OP said he deletes stuff securely, might I suggest using the -P switch on the rm? Otherwise rm just deletes the inode and leaves the data until the blocks get reused.



[ Reply to This | # ]