Error Code -36 driving me insane

Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Open Terminal. Type this:
cd
There is a space after the cd. Drag the icon of the external disk to Terminal. It will look like this:
cd /Volumes/nameofdrive Press Enter.
Type cd .Trashes
Now type: ls -a
You will get a list. You should see whatever is in the Trash.
Now type: rm -r *.*
If you did everything right (make sure), that command will delete EVERYTHING in the .Trashes folder.
If you're not in the .Trashes folder it will delete everything in whatever folder you're in, that's why I said make sure.
If it says something like "operation not permitted" do the command again but put sudo in front of it.
It will ask for your password. Your login password. Make sure it's right because you wont see it as you're typing.
 
Joined
May 21, 2012
Messages
10,739
Reaction score
1,189
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
I just want to delete 1 or 2 files not the whole disk
If you copy all the files you want to keep, off the disk, then erase the disk, you will be done quickly. But, time may not be as important to you as it is to me.
 
OP
J
Joined
Sep 27, 2016
Messages
27
Reaction score
0
Points
1
Open Terminal. Type this:
cd
There is a space after the cd. Drag the icon of the external disk to Terminal. It will look like this:
cd /Volumes/nameofdrive Press Enter.
Type cd .Trashes
Now type: ls -a
You will get a list. You should see whatever is in the Trash.
Now type: rm -r *.*
If you did everything right (make sure), that command will delete EVERYTHING in the .Trashes folder.
If you're not in the .Trashes folder it will delete everything in whatever folder you're in, that's why I said make sure.
If it says something like "operation not permitted" do the command again but put sudo in front of it.
It will ask for your password. Your login password. Make sure it's right because you wont see it as you're typing.

Hi there I had to do a Sudo command and when it showed what was in the trash file there was only a weird code? And I did not know where to go from here please see picture.

Image.png
 
Joined
Oct 16, 2010
Messages
17,540
Reaction score
1,576
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan
Any Help??


Ahem… I dare say, if you had done as Bob suggested in his #23 post, you'd be done and finished by now and with a nice clean directory file to boot.

And God only knows what possible Seagate stuff may be hiding on that drive which would also get eliminated in the process using Disk Utility to partition and format the drive.

I'd also be suspicious of "permission" which from the report were "denied".






- Patrick
======
 

Rod


Joined
Jun 12, 2011
Messages
9,696
Reaction score
1,882
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.4.1, Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
Ok, you did not say where the EHD came from so I thought it might be windows formatted. If you bought it new it most certainly would be.
If you did not format it Macintosh Extended (journaled) before using it then you can check what it is by clicking erase using Disk Utility. You do not actually need to erase it, just check what the next window says it is formatted as now then cancel. The error you are experiencing is often a "read" error. So if the files are unreadable and you cannot erase by the standard method then my advice is the same. Save the files you can and erase an reformat the drive.


Sent from my iPhone using Mac Forums
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
That last sudo command is showing an empty directory. You're in the right place.
Are you sure you have files in Trash to delete? Is it showing files in Finder?
. and .. are current directory and one directory up respectively and are supposed to be there.
Not sure why it's showing the 501.
 
M

MacInWin

Guest
cradom, I wonder if somehow 501 is a directory. If so, it could have something that isn't getting deleted in it.

For the OP, repeat the process until you see the dots and 501 again, then type "cd 501" and "ls -a" to see if there is anything in 501. Let us know.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Not near a Mac right now so cant check. 501 is usually your user number.
Wonder if it shows up as a folder if you look in Trash in Finder?
Normally a folder would show up, under the -a switch, as something like:
drwxrw-r-- 10 root root 2048 Jan 13 07:11 foldername
With the d at the beginning.
 
Joined
Oct 16, 2010
Messages
17,540
Reaction score
1,576
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top