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


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Can't delete a file in the trash on OSX 10.11.6
# 29  
Old 12-22-2016
Quote:
Originally Posted by djfilms
DukeNuke2, Here's the result of what you suggested.

Code:
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.

... ... ...
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:
Code:
$ 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:
Code:
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
# 30  
Old 12-22-2016
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 :P
# 31  
Old 12-22-2016
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?
# 32  
Old 12-22-2016
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?
# 33  
Old 12-22-2016
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.
# 34  
Old 12-22-2016
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?
# 35  
Old 12-22-2016
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?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

XFCE Desktop - trash, cannot execute file, command prompt here missing.

Hi there, I am using the xfce4 is already the newest version (4.12.5). thunar is already the newest version (1.8.4-1). The distribution is Linux kali 4.19.0-kali1-amd64 #1 SMP Debian 4.19.13-1kali1 (2019-01-03) x86_64 GNU/Linux However, the problem is: When I when I click on any program to... (2 Replies)
Discussion started by: alvinoo
2 Replies

2. Shell Programming and Scripting

File Locking with fcntl on Darwin Mac OSX

Hello I have a Perl script that works on non-darwin Mac OS X environments and I think I have narrowed down the issue to a file locking problem. In other linux environments, the flock struct is defined differently. I have adjusted this via the reference for Mac OS X fcntl(2) man page. The... (4 Replies)
Discussion started by: flagman5
4 Replies

3. Solaris

trash can in solaris

one quick question please.. is Solaris have a RECYLE BIN,or TRASH to retrive deleted files accidently ? (0 Replies)
Discussion started by: Sojourner
0 Replies

4. Homework & Coursework Questions

Delete restore and empty trash

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A set of Linux shell scripts is required to allow users to ‘remove' files without them really disappearing... (1 Reply)
Discussion started by: mr100perecent
1 Replies

5. UNIX for Dummies Questions & Answers

Trash

Hello, I deleted a file accidentally using rm-f inside a folder. Is there any option/command to retrive the file or is it possible to recover from trash? or once the file is deleted, it is gone completely?? (2 Replies)
Discussion started by: sydney2008
2 Replies

6. Linux

Emptying Trash

Hi all i hope someone can help me, in gnome if you right click on trash, you get another menu appear 'Empty Trash' what i want to do is be able to edit this command so that it secure deletes the trash, where is that command? so i can edit it. thanks in advance for any help, Dave (shred -z -u ) (0 Replies)
Discussion started by: dave123
0 Replies

7. Filesystems, Disks and Memory

unix executable file problem on MAC OSX ??? please help

I've got this problem. My computers and external hard drives are converting many of my files to a Unix Executable File which has a grey terminal looking icon. I don't understand what is causing this to happen. It is happening to a large number of my image file of different formats and also... (1 Reply)
Discussion started by: chadb
1 Replies

8. Solaris

Script for automatic deletion of trash file of mail server

Hi, I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory. So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically. So my script should be like... (1 Reply)
Discussion started by: crown2100bd
1 Replies

9. UNIX for Dummies Questions & Answers

file permisions 2000 to OSX

Could anyone tell me how or point me in the right direction on how to save files from a 2000box to a OSX server with the correct file permissions. File goes over and the only person that has r/w permissions is the owner everyone else is read only. HELP!!! (2 Replies)
Discussion started by: mom
2 Replies
Login or Register to Ask a Question