There is a file on my Mac called , which is literally impossible to delete in OS X. I got access to Windows 8 and thought I could delete the file from there, but it's not even visible.

So are you able to delete, let alone see such a file in Windows 8?

  • open command prompt in the same folder as the file and type "dir" and hit enter. read through the listed file, do you see your file in it? Jan 28, 2016 at 22:54
  • Where are you seeing this file? What else can you tell us about it (how big is it?;...)?
    – Racing121
    Jan 28, 2016 at 23:07
  • @RACING121 It's on my Desktop, zero bytes (since I opened it up in nano and cleared everything out. There's also a folder on my desktop which is 136 byte. Jan 28, 2016 at 23:13
  • On OSX terminal the bash command, rm -i ? will step through all the single-character file names. When it gets to \000 allow the deletion.
    – AFH
    Jan 28, 2016 at 23:25
  • 2
    I thought the file name was a literal null character - thank you @BenN for clarifying this point. rm -i ? works perfectly on a file named in Ubuntu on an ext4 file system. Things to try: (1) if the file appears in a GUI file manager, delete from there; (2) - if echo ? shows , try echo ?|xargs rm; (3) move all the other files to a different folder, then enter rm *; or (4) move up a directory level and enter rm -r DirName. All of these work in Ubuntu/Nautilus.
    – AFH
    Jan 29, 2016 at 1:46

1 Answer 1


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.

  • 1
    This doesn't really answer the question if you can delete such a file in Windows, but to answer your questions, yes, I tried rm, unlink, and find -delete all of which returned "Invalid argument". I have disabled csrutil so it wouldn't matter, and yes, I am sure it's a file as I created it myself. Jan 28, 2016 at 22:59
  • Saved a textedit document with that name, I also have a folder (with the same name) that I created normally (command + shift + n). Jan 28, 2016 at 23:07
  • It's not a windows drive, it just want to delete the files through windows. The actual files are on an OS X Extended drive. Jan 28, 2016 at 23:12
  • I have Windows installed on my Mac, I don't remember installing anything but my mac drive is visible to windows. Jan 28, 2016 at 23:33
  • deleted my older comments since i edited my answer Jan 29, 2016 at 0:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .