Ok, after some investigation your problem seems more complicated than i initially thought. To clarify, the original question seems to be IMHO: How to delete a file or directory containing the Unicode null character from a HFS+ disk?
The Problem is reproducible on 10.11 (El Capitan), has ocurred to several people over large period of time and seems to be related specifically to HFS filesystem.
Reading several posts about the problem, usually the discussuon ends without solutions. One way to try to solve this seems to boot the mac with an older OSX version, i.e. 10.6 - which still contains the "clri" tool. On my mac, running El Capitan, clri does not exist anymore.
OSX 10.6.2 - man page for clri (osx section 8)
clri deletes a file by iNode number, which you can find out for the offending file by using "ls -li" from the terminal.
Be careful though since this might mess up your computer, do a backup first.
Another solution might be to boot from a Live CD and use a Disk-Editor to manually change the filename directly on the Disk, this would involve studying the exact way filenames are stored on disk by hfs+.
Alternative (safer) solution:
- Make complete Backup.
- Wipe Disk
- Restore backup without this file
The unicode null character is not allowed in filenames on HFS+ so i would consider it a bug, the Finder allows you to save files with that name.
Although you didn't mention HOW you are exactly are booting your Mac into Windows, i doubt that adding an extra abstraction layer (through MacDrive, a Windows HFS+ Driver or on a virtually shared mac volume as would be used by Fusion / Virtualbox etc.pp) would make things easier.
nano
and cleared everything out. There's also a folder on my desktop which is 136 byte.bash
command,rm -i ?
will step through all the single-character file names. When it gets to\000
allow the deletion.rm -i ?
works perfectly on a file named␀
in Ubuntu on anext4
file system. Things to try: (1) if the file appears in a GUI file manager, delete from there; (2) - ifecho ?
shows␀
, tryecho ?|xargs rm
; (3) move all the other files to a different folder, then enterrm *
; or (4) move up a directory level and enterrm -r DirName
. All of these work in Ubuntu/Nautilus.