Fundamentals 6 min read

Why macOS Lets You Use '/' in File Names (And What It Means)

macOS’s Finder accepts slashes in file names by translating them to colons at the kernel level, a legacy of the 1985 HFS design that chose ':' as the path separator, resulting in a persistent “user‑visible schizophrenia” between the UI and the underlying Unix file system.

IT Services Circle
IT Services Circle
IT Services Circle
Why macOS Lets You Use '/' in File Names (And What It Means)

On Windows and Linux a slash / cannot appear in a file name, but on macOS Finder you can rename a file to a/b.png or create a folder c/d without error.

When the same directory is listed in Terminal, the slash is displayed as a colon: a:b.png c:d. Creating a file with touch e/f.txt fails ( touch: e/f.txt: No such file or directory), while touch e:f.txt succeeds, and Finder shows the file as e/f.txt again, swapping the colon back to a slash.

The reason lies in the history of Apple’s file systems. In 1985 Apple introduced HFS (Hierarchical File System) and chose the colon : as the path separator because the slash / was already common in user‑visible names (e.g., To_Be/Not_To_Be). In Unix, however, the slash has been the standard separator since the 1970s, and the colon is an ordinary character.

When Steve Jobs returned to Apple after founding NeXT, the NeXTSTEP operating system (built on BSD Unix) used the slash as its separator. After Apple’s 1996 acquisition of NeXT, the two conflicting conventions had to coexist. Engineers added a translation layer that swaps / and : when files cross the UI‑kernel boundary. This makes a file appear as a/b in Finder but as a:b in the shell, a phenomenon Apple engineers called “user‑visible schizophrenia” in a 2000 USENIX paper titled *The Challenges of Integrating the Unix and Mac OS Environments*.

Even after Apple replaced HFS with APFS in 2017—adding modern features like snapshots, encryption, and space sharing—the translation layer remained unchanged, so the dual identity persists in every Mac today.

Windows filename restriction
Windows filename restriction
macOS Finder allowing slash
macOS Finder allowing slash
Historical HFS colon separator
Historical HFS colon separator
APFS migration
APFS migration
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

UnixmacOSFile SystemHFSAPFSPath Separator
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.