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

newtestleper88

macrumors newbie
Original poster
Jan 24, 2016
15
0
I found one suggestion on the internet that worked: restore to the most recent backup from TM.. even though that backup was from a period when the issue was occurring, the restored version no longer had the undeletable folder in the trash.
That was one of the first things I tried, even before I made this post. The file was still there after doing it, but I guess it doesn't hurt to try it again.
-
I guess it does not hurt to try:
Code:
find . -inum 17617761 -exec srm -is {} \;

Alternatively (confirm with “y” and enter again):
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && srm -ris Rescued\ Items

Nope, still says permission denied.
 

newtestleper88

macrumors newbie
Original poster
Jan 24, 2016
15
0
Which one, the one for a single file or the one for the folder? Can you paste the Terminal output?
Sure
Code:
Gabriels-MacBook-Air:Rescued Items gabrielpinto$ find . -inum 17617761 -exec srm -is {} \;
Remove write protected file ./␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀? y
srm: unable to remove ./␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Permission denied
Gabriels-MacBook-Air:Rescued Items gabrielpinto$ cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && srm -ris Rescued\ Items
Remove write protected file Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Permission denied
Remove write protected file Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀ 2? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Permission denied
Remove Rescued Items? y
srm: unable to remove Rescued Items: Directory not empty
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
Sure
Code:
Gabriels-MacBook-Air:Rescued Items gabrielpinto$ find . -inum 17617761 -exec srm -is {} \;
Remove write protected file ./␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀? y
srm: unable to remove ./␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Permission denied
Gabriels-MacBook-Air:Rescued Items gabrielpinto$ cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && srm -ris Rescued\ Items
Remove write protected file Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Permission denied
Remove write protected file Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀ 2? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Permission denied
Remove Rescued Items? y
srm: unable to remove Rescued Items: Directory not empty

Change the last command into:
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && sudo srm -ris Rescued\ Items

It is odd that the permission denied error is now shown. Maybe you can also do this and post the output here again:
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && ls -lOAn
 

newtestleper88

macrumors newbie
Original poster
Jan 24, 2016
15
0
Change the last command into:
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && sudo srm -ris Rescued\ Items

It is odd that the permission denied error is now shown. Maybe you can also do this and post the output here again:
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && ls -lOAn
Here's what i get from that
Code:
Remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Invalid argument
Remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀ 2? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Invalid argument
Remove Rescued Items? y
srm: unable to remove Rescued Items: Directory not empty
Gabriels-MacBook-Air:Macintosh HD gabrielpinto$ cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" &&
> ls -lOAn
total 0
drwxr-xr-x@ 4 501  20  - 136 Jan 23 20:12 Rescued Items
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
Here's what i get from that
Code:
Remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Invalid argument
Remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀࠀ瀀氀漀琀⸀瀀礀挀Ȁ؀␀␀伧Ȁ㟿㟆㟿㟆퇏⯇哝⯇␀ 2? y
srm: unable to remove Rescued Items/␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀?: Invalid argument
Remove Rescued Items? y
srm: unable to remove Rescued Items: Directory not empty
Gabriels-MacBook-Air:Macintosh HD gabrielpinto$ cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" &&
> ls -lOAn
total 0
drwxr-xr-x@ 4 501  20  - 136 Jan 23 20:12 Rescued Items

Ah my bad, the last command should have been:
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && ls -lOARn


I see that you still get the same error though. I have been having a look at some web results on this, but I haven’t encountered anything else yet.
 

newtestleper88

macrumors newbie
Original poster
Jan 24, 2016
15
0
Ah my bad, the last command should have been:
Code:
cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && ls -lOARn


I see that you still get the same error though. I have been having a look at some web results on this, but I haven’t encountered anything else yet.
Yes, this is truly puzzling! I do really appreciate all your help though, thank you.
Code:
Gabriels-MacBook-Air:Macintosh HD gabrielpinto$ cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && ls -lOARn
total 0
drwxr-xr-x@ 4 501  20  - 136 Jan 23 20:12 Rescued Items

./Rescued Items:
total 0
-rw-------@ 1 501  20  - 0 Jan 27 17:21 ␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀ?瀀氀漀琀?瀀礀挀Ȁ?␀␀伧Ȁ㟿㟆㟿㟆퇏?哝?␀
-rw-------@ 1 501  20  - 0 Jan 27 17:21 ␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀ?瀀氀漀琀?瀀礀挀Ȁ?␀␀伧Ȁ㟿㟆㟿㟆퇏?哝?␀ 2
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
Yes, this is truly puzzling! I do really appreciate all your help though, thank you.
Code:
Gabriels-MacBook-Air:Macintosh HD gabrielpinto$ cd "/Volumes/DeLorean/.Trashes/501/dumb/Gabriel’s iMac/2013-06-21-001338/Macintosh HD" && ls -lOARn
total 0
drwxr-xr-x@ 4 501  20  - 136 Jan 23 20:12 Rescued Items

./Rescued Items:
total 0
-rw-------@ 1 501  20  - 0 Jan 27 17:21 ␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀ?瀀氀漀琀?瀀礀挀Ȁ?␀␀伧Ȁ㟿㟆㟿㟆퇏?哝?␀
-rw-------@ 1 501  20  - 0 Jan 27 17:21 ␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀ᘀȀ?瀀氀漀琀?瀀礀挀Ȁ?␀␀伧Ȁ㟿㟆㟿㟆퇏?哝?␀ 2

I have no idea what else to suggest. Normally this sort of thing should be corrected by a file-system repair or at the very least a deletion by inode number. Time Machine will obviously not help you as long as the external volume has that problem. The external drive's .Trashes folder contains deleted content that Finder will automatically present to you in the Dock’s Trash. You could attempt to move the contents of the .Trashes folder to something else, but I suppose that you would not get around reformatting your partition or external drive.

Code:
cd /Volumes/DeLorean && mv .Trashes Trash

You may have to execute the mv command with sudo again:
Code:
cd /Volumes/DeLorean && sudo mv .Trashes Trash
 
Last edited:

Alrescha

macrumors 68020
Jan 1, 2008
2,156
317
I had an old time machine backup on an external HDD that I stupidly tried to delete by dragging it to the trash.

Time Machine backups are protected six different ways by the OS. If you want to delete one manually, you use tmutil to delete them, eg:

sudo tmutil delete path

With all the futzing about, it may be impossible for you to put this file back and delete it. But it is worth trying tmutil to just see if you can delete it in place.

Alternatively, you can try this:

sudo /System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass rm filename

A.
 
Last edited:

2984839

Cancelled
Apr 19, 2014
2,114
2,241
I'm stumped too. I have been following this thread and trying various things to reproduce the symptoms of the problem, but can't do it.

You could try to overwrite the file using dd, then delete it.

Code:
find . -inum 17617761 -exec dd if=/dev/zero of={} bs=1m  count=1 \;

If all goes well, this will overwrite the corrupted file with 1 megabyte of zeroes. If the file structure is corrupted and causing problems, this should take care of that. You can play with the size indicated by the "bs" option to make sure it is larger than the original file to ensure it is totally overwritten. The file name will still be garbled though and rm won't be able to parse it, so you'll have to follow the earlier procedure for deleting it.

Assuming the inode is the same:

Code:
find . -inum 17617761 -exec rm -i {} \;

or try @KALLT's version using srm

Code:
find . -inum 17617761 -exec srm -is {} \;
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.