This is not true, and I do not see why it should be like that. You cannot, for example, have slashes in filenames; and for good reasons. Disallowing spaces in filenames solves a lot of problems.
This is not true, and I do not see why it should be like that. You cannot, for example, have slashes in filenames; and for good reasons. Disallowing spaces in filenames solves a lot of problems.
There used to be a bug in the Gatorbox Mac Localtalk-to-Ethernet NFS bridge that could somehow trick Unix into putting slashes into file names via NFS, and Unix would totally shit itself when that happened. That was because Macs at the time (1991 or so) allowed you to use slashes (and spaces of course, but not colons), and of course those silly Mac people, being touchy feely humans instead of hard core nerds, would dare to name files with dates like "My Spreadsheet 01/02/1991".
https://en.wikipedia.org/wiki/GatorBox
I just tried to create a file name on the Mac in Finder with a slash in it, and it actually let me! But Emacs dired says it actually ended up with a ":" in it. So then I tried to create a file name with a colon in it, and Finder said: "Try using a name with fewer characters or with no punctuation marks." Must be backwards compatibility for all those old Mac files with slashes in their name. Go figure!
If you think nobody would ever want to use a space or a slash in a file name, then you should get out more often and talk to real people in the real world. There are more of them than you seem to believe!
I think that there are more good reasons to disallow spaces than slashes. For one, it is very useful to have a natural character to separate filenames in a string. Then your bash scripts can be simpler! :)
> trick Unix into putting slashes into file names via NFS, and Unix would totally shit itself when that happened
LOL. I love this stuff. There is a similar trick that you can play today to wreak havoc on osx systems. You commit into a git repository a new file whose name only differs in case with an existing one, and ask a mac user to update the repo. Hilarity ensues.
> If you think nobody would ever want to use a space or a slash in a file name, then you should get out more often and talk to real people in the real world. There are more of them than you seem to believe!
But these users should not see the filename anyway, but the "title" of the document, which can be stored inside the file and can have whatever character they want. At the minimum, the user-facing interface can convert user-typed spaces into another character (e.g., a unicode non-breaking space) when writing the file into the filesystem. Raw spaces in filenames are an abomination that make shell scripting unnecessarily difficult. I would love a mount option that disallow the appearance of such things in my disk.
So you think all files should have a human readable title inside of them, huh? Then you're OK with MICROS~1 8.3 file names, and not ok with any file format that doesn't allow a human readable title inside? Should empty files be prohibited too?