9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] spaces in filenames
@ 2002-06-03 12:42 presotto
  0 siblings, 0 replies; 32+ messages in thread
From: presotto @ 2002-06-03 12:42 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

YOu can't read and write from user level a file descriptor that has
already been mounted.  Otherwise, you could side step authentication
to file servers.

[-- Attachment #2: Type: message/rfc822, Size: 2809 bytes --]

From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] spaces in filenames
Date: Mon, 03 Jun 2002 12:06:35 +0200
Message-ID: <200206031006.g53A6ZI15198@zamenhof.cs.utwente.nl>

> > I can bypass the kernel easily enough:
>
> man 9pcon

cpu% aux/9pcon /srv/dns
read9pmsg from server: inappropriate use of fd
cpu%

What does that error message mean?
Did I invoke 9pcon in the wrong way?

Axel.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [9fans] spaces in filenames
@ 2011-04-26 18:08 smiley
  2011-04-26 18:42 ` Rob Pike
  2011-04-26 18:43 ` erik quanstrom
  0 siblings, 2 replies; 32+ messages in thread
From: smiley @ 2011-04-26 18:08 UTC (permalink / raw)
  To: 9fans

Hi,

>From time to time, the issue of having spaces in file names seems to
come up on this list, mostly in the context of discussions on find, du,
Acme, and trfs(4).  All the discussions I've found suggest that file
names with whitespace in them are *legal* on fossil.  I'm running a
9atom 9pcf kernel copied verbatim from the 9atom .iso, on an otherwise
stock Plan 9 4e fossil+venti install.  However, I can't seem to create
files with with spaces in their names.  The resulting error string
reports invalid characters in the file name.  Why doesn't this work?
Has the ability to have spaces in file names been removed from fossil?
If so, then how is it possible that there are files such as
'/n/sources/contrib/steve/file with spaces' hanging around?

While I'm perfectly happy using underscores in lieu of spaces in *my*
file names, there are a number of APE packages (i.e., fgb/lcms)
containing files with spaces in their names.  Since those are the names
used in replica(1), I'm unable to contrib/install(1) any of these
packages.  Are there any known fixes or workarounds for this problem?
(I doubt trfs(4) would help, because the ape would still be naming the
file with spaces, unless specifically modified to match the trfs(4)
translation.)

What's the theory behind excluding whitespace from filenames?  Was it
causing too much discussion on the list?  ;) Since Plan 9 was a total
re-think of Unix, I have to wonder why this problem wasn't fixed.  If
Plan 9 used 0x00 (NUL) as the record separator (instead of newline),
many of these types of problems could be averted.  Why don't we?

Also, if anyone knows where I can find 9fans archives prior to March
2008, please let me know.  The archives I was able to find only go back
that far.

Also, quanstro, would you whitelist me?  I can't seem to get mail to you
off-list.  Thanks!

--
+---------------------------------------------------------------+
|E-Mail: smiley@zenzebra.mv.com             PGP key ID: BC549F8B|
|Fingerprint: 9329 DB4A 30F5 6EDA D2BA  3489 DAB7 555A BC54 9F8B|
+---------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 22:17 Russ Cox
  2002-06-01 22:25 ` William Josephson
  2002-06-03 10:06 ` Axel Belinfante
  0 siblings, 2 replies; 32+ messages in thread
From: Russ Cox @ 2002-06-01 22:17 UTC (permalink / raw)
  To: 9fans

> I can bypass the kernel easily enough:

man 9pcon


^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 22:16 Russ Cox
  0 siblings, 0 replies; 32+ messages in thread
From: Russ Cox @ 2002-06-01 22:16 UTC (permalink / raw)
  To: 9fans

> Sorry, I should have said: this was on a 3rd edition kfs.

The bug is still there in the 4e kfs binary I am running.
I am just very confused as to why.

Russ


^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 14:55 Richard Miller
  0 siblings, 0 replies; 32+ messages in thread
From: Richard Miller @ 2002-06-01 14:55 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

> Anyhow, you didn't misunderstand the syntax.
> That should have worked.  That's how the
> install moves your old file system into /3e.

Sorry, I should have said: this was on a 3rd edition kfs.

-- Richard


[-- Attachment #2: Type: message/rfc822, Size: 2183 bytes --]

From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] spaces in filenames
Date: Sat, 1 Jun 2002 10:01:43 -0400
Message-ID: <ecb4d092e6486a09039ef6b51f86ee42@plan9.bell-labs.com>

> I got myself into trouble recently by misunderstanding the syntax
> of the kfs 'rename' command.  If you do something like
>
>   disk/kfscmd 'rename /tmp/xxx /tmp/yyy'
>
> you end up with a file in /tmp with slashes in its name.  Exercise
> for the reader: how do you get rid of it?

That's one of the first Plan 9 mistakes I ever made.
I killed off the partition and started afresh.  (Not the right answer.)

Anyhow, you didn't misunderstand the syntax.
That should have worked.  That's how the
install moves your old file system into /3e.
The case where src and dst are in same
directory must use the wrong name.

Russ

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 14:16 Russ Cox
  0 siblings, 0 replies; 32+ messages in thread
From: Russ Cox @ 2002-06-01 14:16 UTC (permalink / raw)
  To: 9fans

> Anyhow, you didn't misunderstand the syntax.
> That should have worked.  That's how the
> install moves your old file system into /3e.
> The case where src and dst are in same
> directory must use the wrong name.

I have no idea why this doesn't work.  I'm staring
at the rename code and it really should work.
Unless I misunderstand what nextelem does.

You'll note that

	disk/kfscmd 'rename /tmp/yyy a/b/c/d'

correctly diagnoses the fact that there are slashes
in the new name.  Destinations beginning with /
are supposed to do what you expect.

I'm leaving for a trip soon, but will be online
with reasonable frequency.  If someone else
wants to add the appropriate print, figure out
what's wrong, and send me a fix, I'd be happy to
put it in.

Russ



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 14:15 Russ Cox
  0 siblings, 0 replies; 32+ messages in thread
From: Russ Cox @ 2002-06-01 14:15 UTC (permalink / raw)
  To: 9fans

> hmm ... disk/kfscmd 'rename /tmp/\/tmp\/yyy yyy'?

you expect far too much from kfs.



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 14:10 Russ Cox
  2002-06-01 14:38 ` William Josephson
  0 siblings, 1 reply; 32+ messages in thread
From: Russ Cox @ 2002-06-01 14:10 UTC (permalink / raw)
  To: 9fans

> You should be able to rename it again; maybe you'll need to rename
> it in to another directory if there is a bug.

BZZT!  How do you rename it?  When you pass
the path to kfs or the kernel, it will tokenize
it into

	'tmp' 'xxx' 'tmp' 'yyy'

instead of

	'tmp' 'xxx' '/tmp/yyy'

as is necessary.



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 14:01 Russ Cox
  0 siblings, 0 replies; 32+ messages in thread
From: Russ Cox @ 2002-06-01 14:01 UTC (permalink / raw)
  To: 9fans

> I got myself into trouble recently by misunderstanding the syntax
> of the kfs 'rename' command.  If you do something like
>
>   disk/kfscmd 'rename /tmp/xxx /tmp/yyy'
>
> you end up with a file in /tmp with slashes in its name.  Exercise
> for the reader: how do you get rid of it?

That's one of the first Plan 9 mistakes I ever made.
I killed off the partition and started afresh.  (Not the right answer.)

Anyhow, you didn't misunderstand the syntax.
That should have worked.  That's how the
install moves your old file system into /3e.
The case where src and dst are in same
directory must use the wrong name.

Russ



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 13:55 Richard Miller
  2002-06-01 14:05 ` William Josephson
  0 siblings, 1 reply; 32+ messages in thread
From: Richard Miller @ 2002-06-01 13:55 UTC (permalink / raw)
  To: 9fans

I got myself into trouble recently by misunderstanding the syntax
of the kfs 'rename' command.  If you do something like

  disk/kfscmd 'rename /tmp/xxx /tmp/yyy'

you end up with a file in /tmp with slashes in its name.  Exercise
for the reader: how do you get rid of it?

-- Richard



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01 13:46 Russ Cox
  0 siblings, 0 replies; 32+ messages in thread
From: Russ Cox @ 2002-06-01 13:46 UTC (permalink / raw)
  To: 9fans

looks like you pulled in a big one, geoff.
where do you get such great lures?



^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [9fans] spaces in filenames
@ 2002-06-01  5:02 Geoff Collyer
  2002-06-01 13:41 ` Michael Baldwin
  0 siblings, 1 reply; 32+ messages in thread
From: Geoff Collyer @ 2002-06-01  5:02 UTC (permalink / raw)
  To: 9fans

Okay, you're a communist.  ☺

On Unix, part of the problem is scripts that use $* when they should
use "$@", but the need to quote file names containing spaces
interactively is an on-going nuisance.

If you're going to allow spaces, then why not allow tabs?  They have
traditionally been considered equivalent whitespace, with a few
exceptions (e.g., make, tbl).  I don't see a compelling reason to
allow spaces but not tabs.  And if you allow spaces and tabs, why not
newline, it's whitespace too.  And as long as we're allowing any old
character in file names, why not allow slashes in file name
components?  Sure, we'll have to introduce some ugly hack like having
the kernel understand /this\/is\/all\/one\/component, but by now we're
not afraid of a little quoting, right?  And why discriminate against
NUL?  Shouldn't one be able to have a file name like 'This is a
history of the \0, \\ and \/ characters in computing, © 2002 <a
href="http:\/\/pedant.com\/peter.jpg">Peter Pedant<\/a>', where \0
represents a NUL byte?

We could also adopt another Mac OS tradition, case-insensitive file
names.  Pretty soon our file names will be as ungodly a stew as
anything ever parsed by MVS or VMS.



^ permalink raw reply	[flat|nested] 32+ messages in thread
* [9fans] spaces in filenames
@ 2002-06-01  3:35 Michael Baldwin
  2002-06-01 16:54 ` Digby Tarvin
  0 siblings, 1 reply; 32+ messages in thread
From: Michael Baldwin @ 2002-06-01  3:35 UTC (permalink / raw)
  To: 9fans

really, what is the big deal with spaces in filenames?  yeah, there are
some file formats here and there, and some shell files that maybe aren't
so careful, so it's not a cakewalk, but it isn't some Big Huge Problem.
using shells like rc that manage lists of string works quite well; if
you need a list of files use "ls" not "echo"; if you really want to use
the output of a command with backquote, set ifs to \t\n.

geoff talks about how maddening it is to use filenames with spaces on
mac os x.  i use mac os x too, and have lots of files with spaces, and i
use quotes on the occasion that i refer to them in the shell.  i haven't
noticed any "problem" that would cause me to go mad, and everything
works just fine from the shell and the gui for me.  i send spacey
filenames to web sites, attach/detach them from mail messages, move them
about, and things work.  what am i missing?  now that i can use spaces,
i kinda like using space instead of _ in names -- easier to type and
easier to read.  why banish the poor lowly space character?  so call me
a communist for my radical views.

the only problem i've had with spaces is getting to spacey files on
windows and unix from plan 9 and inferno.  i took out the space
restriction in inferno and things work swimmingly.  yeah, i know there
are gotchas here and there, but they really haven't been an issue.  i
much prefer the ability to manipulate files to the odd gotcha.

oh, the non-printable range also includes 7F, so it's really 00-1F and
7F-9F that are restricted.  it does seem to be a Good Thing that \t and
\n are not allowed, leaving them usable as delimiters.  unix lets you
create such files, but they definitely seem rare, and it is a bit harder
to do from a gui.  who cares if they don't work right.  but leave poor
space alone.



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-04-28  9:58 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-03 12:42 [9fans] spaces in filenames presotto
  -- strict thread matches above, loose matches on Subject: below --
2011-04-26 18:08 smiley
2011-04-26 18:42 ` Rob Pike
2011-04-26 18:44   ` erik quanstrom
2011-04-26 18:52   ` dexen deVries
2011-04-26 19:31     ` Rob Pike
2011-04-26 19:35       ` Paul Lalonde
2011-04-27 13:10       ` Digby Tarvin
2011-04-27 13:16         ` erik quanstrom
2011-04-27 13:21         ` Steve Simon
2011-04-28  9:58           ` Peter A. Cejchan
2011-04-26 18:43 ` erik quanstrom
2011-04-27  2:30   ` smiley
2011-04-27  2:39     ` erik quanstrom
2002-06-01 22:17 Russ Cox
2002-06-01 22:25 ` William Josephson
2002-06-03 10:06 ` Axel Belinfante
2002-06-01 22:16 Russ Cox
2002-06-01 14:55 Richard Miller
2002-06-01 14:16 Russ Cox
2002-06-01 14:15 Russ Cox
2002-06-01 14:10 Russ Cox
2002-06-01 14:38 ` William Josephson
2002-06-01 14:01 Russ Cox
2002-06-01 13:55 Richard Miller
2002-06-01 14:05 ` William Josephson
2002-06-01 13:15   ` Sam
2002-06-01 13:46 Russ Cox
2002-06-01  5:02 Geoff Collyer
2002-06-01 13:41 ` Michael Baldwin
2002-06-01  3:35 Michael Baldwin
2002-06-01 16:54 ` Digby Tarvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).