4

There are 20 items in the trash.

I want to delete a single selected item from trash.

How is it possible?

I asked this question because in the following circumstances I was confused.

Suppose I have three directories named iGolf:

/mac007/users/srk/iGolf
/mac007/users/srk/Desktop/iGolf
/mac007/users/srk/Projects/iGolf

If I move all three iGolf directories to the trash, there are now three iGold directories there. How can I know which is the Desktop one and which isn't?

I want to be able to restore the "Desktop/iGolf" directory back to its original location and remove the others from the trash. How is this possible?

Edit:

See the following image. Mac OS X 10.5.7 doesn't provide the delete option from trash.

alt text

5 Answers 5

9

Open a terminal window and type in "rm " (without the quotes, but with a space at the end).

Open the trash and drag the file you want to delete onto the terminal window. The file path will appear.

Press return in the terminal window to delete the file.

You can remove multiple items by highlighting the trash item and scroll down as many items as you want removed, hold shift key and highlight last item and all items in between will be highlighted. Drag over to terminal, as above, and all will be deleted.

works for me on 10.6.8

0
6

Open the Terminal, in your Utilities folder and then type:

rm .Trash/filename

Where filename is the file or file path you want to remove.

3
  • 4
    That would be rm .Trash/filename, right? Sep 1, 2009 at 19:45
  • Try the "Get Info" Dialog, see if you can find out where the file came from. I am not on my mac right now, so i can not test this. Sep 1, 2009 at 20:04
  • 2
    A side not: when using rm, use -- before the file names, to avoid accidentally passing extra flags: rm -- ./Trash/filename. This way you won't regret it if you try to delete a file named -rf. Sep 1, 2009 at 22:20
3

You have a problem with a simple enough solution: Restore all three of them, then put the two that you don't want back in the trash.

2

From your previous question: How Do I Delete a File Using the Terminal from my Trash in Mac OS X

Instead of using rm -rf ~/.Trash/* you can specify a file by replacing the * with the name of the file.

0

1)To delete a file type "rm" space "your file location"(just drag and drop the file) then press Return key.

Eg:-Apples-MacBook-Pro:~ apple$ rm /Users/apple/.Trash/images.jpg

2)To delete a file type "rm -r" space "your folder location"(just drag and drop the file) then press Return key.

Eg-rm -r /Users/apple/.Trash/PHOTO 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .