From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 8 Apr 1998 10:45:42 -0700 From: Tom Duff td@pixar.com Subject: [9fans] allowing space (ASCII 0x20) in file names Topicbox-Message-UUID: 74446a7a-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19980408174542.kxyxOE4UTOqW7uOv-iCD10YY3pOtBbOALuSQ1bd6a7I@z> On Apr 8, 1:08pm, Russ Cox wrote: > Subject: re: [9fans] allowing space (ASCII 0x20) in file names > intro(5) says "Plan 9 names may contain any printable character > (that is, any character outside hexadecimal 00-1F and 80-9F) except > slash and blank", so yes it looks like the idea is to disallow > unprintables. > > i don't know the official reasons that space isn't allowed, > but in general file names with spaces (which you have to deal > with in Unix and Windows) are a pain for oodles of reasons. the most > noticeable one is that it messes up scripts and the like: > ls -l | awk '{print $10}' is no longer guaranteed to give > you filenames. Yes, this is certainly the reason. When I was working on the plan 9 shell, I did a survey of all the file names on all the unix machines that I could conveniently look at, and discovered, unsurprisingly, that characters other than letters, digits, underscore, minus, plus and dot were so little used that forbidding them would not impact any important use of the system. Obviously people stick to those characters to avoid colliding with the shell's syntax characters. I suggested (or at least considered) formalizing the restriction, specifically to make file names easier to find by programs like awk. Probably rob took the more liberal road of forbidding del, space and controls, the first because it is particularly hard to type, and the rest because, as Russ noted, they confound the usual line- and field-breaking rules.