Can't delete a file in the trash on OSX 10.11.6

The clri command is not part of OSX. On which system did you use it?

I've used it on many different Unix OS's. As I said, I'm talking generics here.

This page:

from this forum seems to indicate 'clri' is on OSX too. Perhaps not.

---------- Post updated at 12:52 PM ---------- Previous update was at 12:48 PM ----------

See this too:

Is it possible to delete, let alone see, a file called "" on Windows 8? - Servers

Personally I don't know OSX enough to even attempt this. Repeat, I'm just talking generically and would not recommend non-pro's to even look at it.

You need to thoroughly understand how Unix filesystems work internally. You can blow your whole system up, just like that!

I have no clri on my OSX. I guess the command was replaced by something else... I'll check if I find the time! Thanks anyway and maybe someone else comes up with another idea.

According to the link I posted (about Windows 8), clri existed in OSX 10.6
Scroll down the page.

Whether a MAC can boot a 10.6 media DVD, mount the hard disk filesystem, and then use clri to nuke the inode, I have no clue. (It's the kind of thing I'd do on other OS's though.)

For me it's not worth to try it out... In the next few days the system will be nuked completly anyway :D. I guess all my needed drivers and Logic plugins are now available on 10.12.X and I can go to the latest and greatest Mac OS (with all the new problems) and have sooo much fun ;).

DukeNuke2, Here's the result of what you suggested.

djCUDA:ee macuser$ ls *T* | od -bc
0000000   342 220 200 111 116 111 124 120 151 143 153 145 162 040 062 056
             **  **   I   N   I   T   P   i   c   k   e   r       2   .
0000020   060 012                                                        
           0  \n                                                        
0000022

The file is very old, and so is probably from a pre-UNIX version of the Mac OS.

---------- Post updated at 08:56 AM ---------- Previous update was at 08:53 AM ----------

Gull04, The OS won't let me re-name the file. IT tells me I "can't use that filename, try fewer letters and no punctuation".When I try calling it "x", I get the same message.

regards, David

---------- Post updated at 08:59 AM ---------- Previous update was at 08:56 AM ----------

Hicks8, Here's the result of your suggestion:

djCUDA:ee macuser$ rm -i *
remove INITPicker 2.0? Y
rm: INITPicker 2.0: Invalid argument

Again, it doesn't like the NUL as the first character.

regards, David

---------- Post updated at 09:03 AM ---------- Previous update was at 08:59 AM ----------

DN2, many thanks for your continued examination of this problem. I'm reluctant to install OSX 10.12 because of all my plug-ins, but I may be forced to choose between error messages on emptying the trash and updating the OS and hoping nothing breaks (yeah, right....].

regards, David

---------- Post updated at 09:07 AM ---------- Previous update was at 09:03 AM ----------

Hicks8, I looked at the post you reference, and note that I'm not the first to have this problem. Still no solution, alas.

regards, David

---------- Post updated at 09:10 AM ---------- Previous update was at 09:07 AM ----------

DukeNuke2,

The offending file is in my trash. If I re-install OS X 10.11, will my existing user account be over-written, and so the trash associated with the account will be deleted, along with my rogue file?

A re-install will only be successfull, if you do a complete new install and use timemachine to restore all files, except the files in question. For my new install I will do exactly that. Everything new and even no timemachine restore. Will take at least 2-3 days until that is done but I guess it is about time to do it anyways and have a fresh start...

DN2, good luck!!!

regards, David

1 Like

OK. So, as I assumed, there are no NUL bytes in the filename.

And, with a current Apple OS (macOS Sierra Version 10.12.2), I am able to create a file with the filename you're using and remove it with no problems when the file is in an hfs (local, journaled) filesystem:

$ ls -l
$ fn=$(printf '\342\220\200INITPicker 2.0')
$ touch "$fn"
$ ls -l *T*
-rw-r--r--  1 dwc  staff  0 Dec 21 23:18 INITPicker 2.0
$ ls *T* | od -bc
0000000   342 220 200 111 116 111 124 120 151 143 153 145 162 040 062 056
             **  **   I   N   I   T   P   i   c   k   e   r       2   .
0000020   060 012                                                        
           0  \n                                                        
0000022
$ rm -i *T*
remove INITPicker 2.0? y
$ ls -l
$ 

And, this works both with my default locale setting:

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

and with LC_ALL=C

The problem should be a 10.11.X one only... Soon 10.12 will run on my Mac and I can go on and find new problems :stuck_out_tongue:

Solaris for one system I've used it on. It is an old UNIX command for fixing file systems.

While we're on this path: Does OSX have debugfs? And is there a reason not to run fsck on the filesystem?

I just spent some more time researching this on the web (as you do!).

Your original post mentioned that this started when you had an external drive connected. Well it seems to me, and I'm not an OSX user, (and I'm fed up with saying that) that OSX differentiates between local and external drives. Meaning it doesn't accept weird filenames on local drives but expects them on external drives.

I found this statement/solution on a web forum, it's probably copyright content so I'll acknowledge that right now.

"I had a similar issue once and I just connected a FireWire cable between my two Macs that are near by and then started the one Mac [that had the stubborn file] in Target Disk Mode then when it mounted on the other Mac I went to the location trashed the file, emptied the trash, dismounted the Mac in Target Disk Mode unplugged and restarted it normally and *poof* the file was gone forever."

So what do all you OSX users think?

Hicksd8, Brilliant! Using a second Mac (running Mavericks) worked to delete the copy of the offending file I had on the desktop. But.... I can't see the trash in the mounted remote Mac. I can't drag the file out of the trash, as it only makes a copy and does not move it.

Any idea how to see the remote trash?

Thanks for researching and posting! Much appreciated.

I'm pleased to be of help but I only just about understand what you're saying. I'm not an OSX user. Perhaps another subscriber to this thread can help you. Anyway, sounds lime some progress.

---------- Post updated at 03:44 PM ---------- Previous update was at 03:41 PM ----------

Okay, this is probably a stupid question but, if you know OSX internals and you know where the trash is really kept, can't you just go to that folder on the remote machine?

hicksd8, Yes, progress. I really don't know anything under the hood for OS X, being allergic to UNIX :-). However, I did discover that I can drag the folder containing the offending file out of the trash to the desktop. Then I discovered that using the Firewire connection, the controlling Mac only sees a SATA volume in the Mac with the problem file, and not the PCIe SSD where the original problem occurred. Jeeeeeez, can things get any more convoluted?

need to access trash folder of computer connect... |
Official Apple Support Communities

---------- Post updated at 03:57 PM ---------- Previous update was at 03:54 PM ----------

If we were talking Solaris, Linux or SCO I could offer some serious help. I'm just severely disadvantaged with OSX.

Hickd8, Noted. And thanks again for your posts.

You're welcome. You obviously have great OSX knowledge and will continue with research. There are some big guns subscribed to this thread who aren't currently online - DukeNuke2, Don, Jim, RudiC and Gull04.

Probably at least some of them will be able to add something to this.

Let's keep with it.

---------- Post updated at 04:31 PM ---------- Previous update was at 04:09 PM ----------

Dunno if it's relevant but I've been reading about a OSX utility called 'trimforce' which enables access to SSD drives. Perhaps search for that and checkout if it's relevant to help out this issue.

To access the content of a hidden folder, you just have to know the path.

If both drives were named the same (Macintosh HD), then the "external" will show up as "Macintosh HD 2".
If it is not named the same, just replace the volume name in the second command below, with the actual volume name.

ls -al /Volumes
open /Volumes/Macintosh\ HD\ 2/Users/username/.Trash

Then you can select the file and try deleting it in the GUI.

It may be necessary to "ignore permissions" on the mounted volume, which you can do via GUI's "Get Info" at the very bottom of the Get Info window for a mounted external volume. Don't forget to set it back when you're done.

1 Like