Trash

Discussion in 'MacBook Pro' started by escogido, Aug 5, 2011.

  1. escogido macrumors member

    Joined:
    Jun 10, 2011
    #1
    I can't empty my trashon my 2011 MBP, running Lion. I've deleted a 'locked' image file and the trash won't empty it, even though it asks me if I want to just empty the 'unlocked' items or 'everything' I click 'empty everything', but it's still there afterwards. And I can't 'put it back' either to unlock it and then delete it. Restarting doesn't help either, trash still shows the item there. It's a small file, but trash showing crap in it is driving me bananas!! :mad::mad::mad:
     
  2. firestarter, Aug 5, 2011
    Last edited: Aug 5, 2011

    firestarter macrumors 603

    firestarter

    Joined:
    Dec 31, 2002
    Location:
    Green and pleasant land
    #2
    Do you know terminal commands?

    Start the terminal.

    Type:

    cd .Trash (hit return)
    ls -a (hit return)

    Can you see the name of the problem file? What's it called?

    Type:

    sudo rm -f <filename> (return)
    (where <filename is the name of the file, in double quotes if the filename has spaces in it>)

    Make sure you've typed the filename correctly. sudo rm -f tells the machine to log in as admin and delete files 'with force'. You can damage stuff using this incorrectly.

    At this point you should be asked for your admin password. Enter it and hit return.

    ls -a (return)

    The file should now be gone
     
  3. fireshot91 macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #3
    This belongs more in the OS X forums, instead of the Macbook Pro forums, but nonetheless, it's alright.


    I recall a button combination that empties the trash through everything. I think it was like command+Click the Empty Trash button? It might have been shift, I don't remember.
     
  4. escogido thread starter macrumors member

    Joined:
    Jun 10, 2011
    #4
    Here's what happened:

    Last login: Fri Aug 5 18:11:48 on console
    Maxims-MacBook-Pro:~ Maxim$ cd.trash
    -bash: cd.trash: command not found
    Maxims-MacBook-Pro:~ Maxim$ cd .Trash
    Maxims-MacBook-Pro:.Trash Maxim$ ls -a
    . .. screen-capture.png
    Maxims-MacBook-Pro:.Trash Maxim$ sudo rm -f <screen-capture.png>
    -bash: syntax error near unexpected token `newline'
    Maxims-MacBook-Pro:.Trash Maxim$

    So, I'm getting an error - what's next?
     
  5. firestarter macrumors 603

    firestarter

    Joined:
    Dec 31, 2002
    Location:
    Green and pleasant land
    #5
    Loose the <>

    Should have been sudo rm -f screen-capture.png
     
  6. escogido thread starter macrumors member

    Joined:
    Jun 10, 2011
    #6
    I did as you said lol!! it worked without the <> thanks!
     

Share This Page