Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tennismanclay

macrumors regular
Original poster
May 11, 2007
221
1
US-Texas
I have been on the computer for over 3 hours, literally. I can not find an answer anywhere.

I moved a unfinished time machine backup to my trash, and i cannot seem to empty my trash. I could literally list a full page of terminal commands i have found and tried that didnt work. The attachment is what my trash looks like. I thought about listing everything i have tried but it would take forever to type.

The last few hours have been the worst nightmare of figuring out how to do something on a mac. Im so flustered i can hardly talk, if you know what i mean.



So if any of you know how to get rid of these files in my trash (also in my external .Trashes folder) please, please share. When i unplug my drive they go away but anyways.


EDIT: if someone could explain what those weird files are in my trash i would sure like to know.
EDIT 2: The second attachment is what a secure delete does, and waiting around 4 hours. Also i cant reformatt the drive, i have over 70gb of stuff that i can't lose.
thanks in advance
 

Attachments

  • Picture 6.png
    Picture 6.png
    76.2 KB · Views: 459
  • Picture 5.png
    Picture 5.png
    12.9 KB · Views: 209
You tried a sudo rm -rf 'directory'? I had to use it to blast away my failed backups ages ago.

WARNING: DON'T TRY THAT COMMAND UNLESS YOU KNOW WHAT YOU'RE DOING.
 
You tried a sudo rm -rf 'directory'? I had to use it to blast away my failed backups ages ago.

WARNING: DON'T TRY THAT COMMAND UNLESS YOU KNOW WHAT YOU'RE DOING.

Why is it so drastic? it could potentially delete all of your data, How. i mean you put that command and then the directory, and whatever directory it is gets deleted, except for in my case.

I half-ly know what im doing =]


and my system is fine after doing those commands btw.


EDIT: and that command didnt work. forgot the error message tho
 
download MainMenu for OSX, then you have a option to "force empty" the trash, it works, i have used it a few times on some stubborn items.
 
download MainMenu for OSX, then you have a option to "force empty" the trash, it works, i have used it a few times on some stubborn items.

i give you serious props for getting my hopes up so high. I really thought it was going to work. But after its done there still there...




EDIT: actually it never ends, it just stops and takes the icon out of the menubar. weird, maybe on of the files is causing it to do that.
 
It seems you are deleting your timemachine backups right? Have you tried first disabling time machine and then emptying the trash (or running the script)? Only think I can think of.
 
More information needed. Do you want to delete an entire archive, or just one backup point?

What, EXACTLY, did you drag to the trash? (I.E., Time Machine creates a sparsebundle, and inside of that sparse bundle it creates files representing backup points. Did you drag the sparsebundle, a single backup point that was in the process of being created, or what?)

On what, exactly, have you been trying your terminal commands? Is it the file structure on the external volume, or the files in the trash?

What error messages have you received? For instance, when you tried rm -rf on the offending files, what did it report? If nothing, what about rm -rfv?

We are trying to figure out where these files are actually residing on your disks. We use ls (list directory command) with the -a flag to list hidden files as well.

First, open your trash, select one of the time machine folders that you're trying to delete, cmd-i to get info, and look at the Where: line. That will probably be sufficient to find the real location of the offending files. Try rm -rfv on that path that is displayed on the Where: line.

If that doesn't work, please post the output from
Code:
ls -a ~/.Trash/
ls -a /.Trash/
ls -a /Volumes/TimeMachineVolume/ # substitute the real name of your time machine volume
ls -a /Volumes/TimeMachineVolume/.Trashes # ditto substitution
ls -a /Volumes/TimeMachineVolume/.Trashes/501/
NOTE: When I checked this on a disk image that I just created to check this, I found that all of my trashed stuff was actually moved to a folder called /501/ inside of .Trashes. I don't know why it does this; perhaps your number will be different, but if you have a number, check inside of it to see if your offending files are there.

Now, my wild guesses:

1. The weird files are almost certainly corrupted files caused by transferring them in the middle of their creation.

2. When you trash files on an external volume or different partition from where your ~ directory resides, it doesn't actually move anything into the metaphorical trashcan on your desktop. I'm fairly confident that what it actually does is create a directory called .Trashes on that external volume and moves the trashed files to that folder. When you mount a volume with OS X, it displays the items in that .Trashes file as if they were sitting in the metaphorical trashcan on your dock, and when you unmount a volume in OS X, it removes them. The effect is that it looks like your files have moved, but they actually still reside on the remote volume. This is necessary because there is no guarantee that you will have space in your local disk to contain the data that is to be trashed on a remote volume or partition.

This means that you probably aren't going to be able to hit those files by targetting anything in the trashcan (~/.Trash/). Instead, what looks like is happening is that the files you are trying to delete are corrupted, and Trashcan is choking on them; it can't delete them. So you are going to have to nuke the files directly off of the remote drive to get it to stop displaying in your trashcan. I suggest rm -rfv /remotedrive/.Trashes/ (don't miss!). You want to delete 7.4 million files. This will take hours. Thus, I suggest the -v option so you actually know that the files are being deleted before you invest hours in waiting to see the results.
 
More information needed. Do you want to delete an entire archive, or just one backup point?

What, EXACTLY, did you drag to the trash? (I.E., Time Machine creates a sparsebundle, and inside of that sparse bundle it creates files representing backup points. Did you drag the sparsebundle, a single backup point that was in the process of being created, or what?)

On what, exactly, have you been trying your terminal commands? Is it the file structure on the external volume, or the files in the trash?

What error messages have you received? For instance, when you tried rm -rf on the offending files, what did it report? If nothing, what about rm -rfv?

We are trying to figure out where these files are actually residing on your disks. We use ls (list directory command) with the -a flag to list hidden files as well.

First, open your trash, select one of the time machine folders that you're trying to delete, cmd-i to get info, and look at the Where: line. That will probably be sufficient to find the real location of the offending files. Try rm -rfv on that path that is displayed on the Where: line.

If that doesn't work, please post the output from
Code:
ls -a ~/.Trash/
ls -a /.Trash/
ls -a /Volumes/TimeMachineVolume/ # substitute the real name of your time machine volume
ls -a /Volumes/TimeMachineVolume/.Trashes # ditto substitution
ls -a /Volumes/TimeMachineVolume/.Trashes/501/
NOTE: When I checked this on a disk image that I just created to check this, I found that all of my trashed stuff was actually moved to a folder called /501/ inside of .Trashes. I don't know why it does this; perhaps your number will be different, but if you have a number, check inside of it to see if your offending files are there.

Now, my wild guesses:

1. The weird files are almost certainly corrupted files caused by transferring them in the middle of their creation.

2. When you trash files on an external volume or different partition from where your ~ directory resides, it doesn't actually move anything into the metaphorical trashcan on your desktop. I'm fairly confident that what it actually does is create a directory called .Trashes on that external volume and moves the trashed files to that folder. When you mount a volume with OS X, it displays the items in that .Trashes file as if they were sitting in the metaphorical trashcan on your dock, and when you unmount a volume in OS X, it removes them. The effect is that it looks like your files have moved, but they actually still reside on the remote volume. This is necessary because there is no guarantee that you will have space in your local disk to contain the data that is to be trashed on a remote volume or partition.

This means that you probably aren't going to be able to hit those files by targetting anything in the trashcan (~/.Trash/). Instead, what looks like is happening is that the files you are trying to delete are corrupted, and Trashcan is choking on them; it can't delete them. So you are going to have to nuke the files directly off of the remote drive to get it to stop displaying in your trashcan. I suggest rm -rfv /remotedrive/.Trashes/ (don't miss!). You want to delete 7.4 million files. This will take hours. Thus, I suggest the -v option so you actually know that the files are being deleted before you invest hours in waiting to see the results.





im trying to delete one backup point that never finished. however, i seem to have 3 copies of that backup point in my trashes on my drive and on my mac.


When i first dragged it to the trash it was a file called Backups.backupdb. I have that in my trash along with the other files with the name Backups.backupdb. and then a date.

I have been trying terminal commands on the .trashes file on my external drive, along with the trash on my mac

when i try to rm -rf the backups.backupdb without the date i get this

rm: /Volumes/TimeMachineDrive/.Trashes/501/Backups.backupdb/ClayMacbook/2008-03-11-215622.inProgress/3F469799-2098-4F5A-A586-83600F477060/Macintosh HD/Users/claysandefur/Documents: Permission denied

everything it tries to delete it says permission denied. Note that this is not the only thing that came back when i typed the command in, i just copied
one of them.

i get the same thing with -rfv.

When i try to rm -rfv on the 501 file in .trashes (where all of those files are located. I get the same stuff, Permission denied on each file terminal tries to delete.



ls -a ~/.Trash/ results in 3 dots? see attachment

ls -a /.Trash/ results in no such file or directory? WHERE'D my trash go?


ls -a /Volumes/TimeMachineVolume/ # substitute the real name of your time machine volume results in
. .fseventsd
.. Adobe extra apps
.001b631eb82e All Movies
.DS_Store Backups.backupdb
.Spotlight-V100 Backups.backupdb 17-34-08
.TemporaryItems Backups.backupdb 17-34-08 19-13-12
.Trashes Backups.backupdb 19-13-01
.com.apple.timemachine.supported Clay backup stuff for macbook


ls -a /Volumes/TimeMachineVolume/.Trashes # ditto substitution - results in
.
..
501 (what are the dots, and inside the 501 file are the files im trying to delete.)


inside the 501 folder are these


.
Backups.backupdb 17-34-08
..
Backups.backupdb 17-34-08 19-13-12
Backups.backupdb
Backups.backupdb 19-13-01




the last attachment is the permission denied stuff.


so, hope i answered you questions. =]
 

Attachments

  • Picture 2.png
    Picture 2.png
    8.3 KB · Views: 10,390
  • Picture 3.png
    Picture 3.png
    79.8 KB · Views: 191
prefix rm -rf with sudo. It will remove the permission denied errors you keep getting, and will delete the items forever.

Also, the dots symbolize the folder itself and the folder one level up from the current folder. The single . symbolizes the very folder youre in, two dots (..) symbolize the folder the current folder is in.
 
Just hold down the option key (opt.) when you select empty trash. It just worked for me. Maybe it will work for you?:apple:
 
The weird files are from the Recycle Bin of your Windows partition... Boot and login into your Windows via Bootcamp, run the command prompt, and perform chkdsk command..

If you cannot execute it while in Windows, you can set Windows to perform chkdsk next time it restarts, the restart and boot your Mac to Windows again so that chkdsk can be performed

Empty the Recycle Bin afterwards.. This should solve the problem..
 
The weird files are from the Recycle Bin of your Windows partition... Boot and login into your Windows via Bootcamp, run the command prompt, and perform chkdsk command..

If you cannot execute it while in Windows, you can set Windows to perform chkdsk next time it restarts, the restart and boot your Mac to Windows again so that chkdsk can be performed

Empty the Recycle Bin afterwards.. This should solve the problem..

so i just type in "chkdsk" and thats all, nothing else? And if i can't how do i set it to do it next time it restarts?

Why are these files going into my mac trash can?


After i preform this should i be able to secure empty trash and get rid of the time machine backups? Isnt it still going to be like 8 millions files or whtvr




EDIT: I DID IT. THE FILES ARE GONE, HOPEFULLY FOREVER. IM OFF TO TRY TO DELETE THE BACKUPS USING EITHER TERMINAL WITH THE SUDO COMMAND, LAST TIME IT WAS DELETING THEM IN TERMINAL FOR ABOUT 2 HOURS AND WHEN I CAME BACK TERMINAL WASNT RESPONDING. SO I HAD TO QUIT IT, HOPEFULLY IT WAS BECAUSE OF THOSE WINDOWS FILES. OR I MIGHT TRY A SECURE EMPTY TRASH.

IF I DO IT WITH TERMINAL SHOULD I TRY TO EMPTY THE .TRASHES FOLDER ON MY EXTERNAL OR MY TRASH ON MY MAC?
 
so i just type in "chkdsk" and thats all, nothing else? And if i can't how do i set it to do it next time it restarts?

Why are these files going into my mac trash can?


After i preform this should i be able to secure empty trash and get rid of the time machine backups? Isnt it still going to be like 8 millions files or whtvr




EDIT: I DID IT. THE FILES ARE GONE, HOPEFULLY FOREVER. IM OFF TO TRY TO DELETE THE BACKUPS USING EITHER TERMINAL WITH THE SUDO COMMAND, LAST TIME IT WAS DELETING THEM IN TERMINAL FOR ABOUT 2 HOURS AND WHEN I CAME BACK TERMINAL WASNT RESPONDING. SO I HAD TO QUIT IT, HOPEFULLY IT WAS BECAUSE OF THOSE WINDOWS FILES. OR I MIGHT TRY A SECURE EMPTY TRASH.

IF I DO IT WITH TERMINAL SHOULD I TRY TO EMPTY THE .TRASHES FOLDER ON MY EXTERNAL OR MY TRASH ON MY MAC?

Yes you did answer my questions. We found the real location of the bad files, they were hiding, as expected, in /Volumes/TimeMachineDrive/.Trashes/

Try sudo rm -rfv /Volumes/TimeMachineDrive/.Trashes/

It will prompt you for your administrator's password, then run the command as root. I've never met a file that a sudo'd rm couldn't remove. Good luck! :)
 
Thanks guys

The nightmare is over. Last night i sudo rm the 501 folder in my hidden .Trashes folder on my drive. They are gone from my drive, and from my trash. And now i feel right about how much space stuff is taking up on my external drive.

Im kinda ocd about my trash, and my life is so much happier knowing that its empty =] I feel so relieved. :D



Thanks for everything guys.
 
Trashed the trash

I had a Mac Dock trash item present only when in Parallels/Windows XP that would not empty. In Windows I went to Computer/Local Disc (E_colon)/.Trashes/501/PROBLEM_FILE and deleted the PROBLEM_FILE. It went to the Windows trash, which I then emptied. The Dock Trash emptied - great! :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.