public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Windows/Cygwin directory name stuff
@ 1999-12-16  9:18 Earnie Boyd
  1999-12-31 13:28 ` Earnie Boyd
  0 siblings, 1 reply; 16+ messages in thread
From: Earnie Boyd @ 1999-12-16  9:18 UTC (permalink / raw)
  To: Paul Bailey, cygwin

--- Paul Bailey <pmbailey@senet.com.au> wrote:
> Hi.
> 
> On my Win98 machine, I have a sub-dir called "Installer Programs".  (I also
> have other directory names, and file names, with spaces in them.)
> 
> I installed Cygwin, which went OK.  I was copying and moving files, and
> cd'ing throughout the filesystem.  No problems.  That is, until this:
> 
> cd Installer Programs
> 
> It wouldn't let me.  I tried
> 
> cd InstallerPrograms
> cd Installer_Programs
> cd Installer-Programs
> 

cd Installer\ Programs
cd 'Installer Programs'

both of these should work.

> Nothing doing.  Eventually I got there through:
> 
> cd Installer*
> 
> Fortunately I only have the one directory starting with the word
> "Installer".
> 
> I searched throught the Web for some kind of information on spaces in Unix
> filenames.  What little turned up was succinct one-liners, to the tune of
> "Don't use white space in filenames."  Good advice for a Unix-only box, but
> I *already* have the directories and files named as they are!
> 

Spaces in filenames is absolutely _not_ a good feature.

> Is there some mechanism to navigate in bash through a filesystem where
> directories have spaces in their names?  (I mean, I know Unix sees separate
> words after a command as an argument list, but that doesn't apply in the
> case of "cd" since I don't think you can cd into two separate directories
> simultaneously, in the same shell, at the same time.)
> 

Also in bash, you can use what is know as "Tab Completion".  E.G.:

cd Inst<tab>

this will complete the file name for you.  This will complete the filename for
you.  It will ring the bell if there is ambiguity.  CAUTION: Don't hit the
<tab>  as the first character of the command.

Regards,

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16  9:18 Windows/Cygwin directory name stuff Earnie Boyd
@ 1999-12-31 13:28 ` Earnie Boyd
  0 siblings, 0 replies; 16+ messages in thread
From: Earnie Boyd @ 1999-12-31 13:28 UTC (permalink / raw)
  To: Paul Bailey, cygwin

--- Paul Bailey <pmbailey@senet.com.au> wrote:
> Hi.
> 
> On my Win98 machine, I have a sub-dir called "Installer Programs".  (I also
> have other directory names, and file names, with spaces in them.)
> 
> I installed Cygwin, which went OK.  I was copying and moving files, and
> cd'ing throughout the filesystem.  No problems.  That is, until this:
> 
> cd Installer Programs
> 
> It wouldn't let me.  I tried
> 
> cd InstallerPrograms
> cd Installer_Programs
> cd Installer-Programs
> 

cd Installer\ Programs
cd 'Installer Programs'

both of these should work.

> Nothing doing.  Eventually I got there through:
> 
> cd Installer*
> 
> Fortunately I only have the one directory starting with the word
> "Installer".
> 
> I searched throught the Web for some kind of information on spaces in Unix
> filenames.  What little turned up was succinct one-liners, to the tune of
> "Don't use white space in filenames."  Good advice for a Unix-only box, but
> I *already* have the directories and files named as they are!
> 

Spaces in filenames is absolutely _not_ a good feature.

> Is there some mechanism to navigate in bash through a filesystem where
> directories have spaces in their names?  (I mean, I know Unix sees separate
> words after a command as an argument list, but that doesn't apply in the
> case of "cd" since I don't think you can cd into two separate directories
> simultaneously, in the same shell, at the same time.)
> 

Also in bash, you can use what is know as "Tab Completion".  E.G.:

cd Inst<tab>

this will complete the file name for you.  This will complete the filename for
you.  It will ring the bell if there is ambiguity.  CAUTION: Don't hit the
<tab>  as the first character of the command.

Regards,

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* RE: Windows/Cygwin directory name stuff
  1999-12-16  9:05 Halim, Salman
@ 1999-12-31 13:28 ` Halim, Salman
  0 siblings, 0 replies; 16+ messages in thread
From: Halim, Salman @ 1999-12-31 13:28 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com '

try putting the file/directory name in quotes (single or double) or escaping
the spaces using a backslash.

hope this helps,

salman.

-----Original Message-----
From: Paul Bailey
To: cygwin@sourceware.cygnus.com
Sent: 12/16/99 12:00 PM
Subject: Windows/Cygwin directory name stuff

Hi.

On my Win98 machine, I have a sub-dir called "Installer Programs".  (I
also
have other directory names, and file names, with spaces in them.)

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16 14:55 ` Bob McGowan
@ 1999-12-31 13:28   ` Bob McGowan
  0 siblings, 0 replies; 16+ messages in thread
From: Bob McGowan @ 1999-12-31 13:28 UTC (permalink / raw)
  To: McCunney, Dennis; +Cc: Cygwin

"McCunney, Dennis" wrote:
> 
> > -----Original Message-----
> > From: Earnie Boyd [ mailto:earnie_boyd@yahoo.com ]
> > Sent: Thursday, December 16, 1999 1:55 PM
> > To: Bob McGowan; Paul Bailey
> > Cc: cygwin@sourceware.cygnus.com
> > Subject: Re: Windows/Cygwin directory name stuff
> >
> > > To round out this discussion, there is ONLY ONE character
> > that UNIX (the
> > > kernel) and therefor cygwin (the DLL) really cares about as
> > "special"
> > > and that is the forward slash (/).  This is the delimiter in a path
> > > between the various names.  You _cannot_ have a name that contains a
> > > literal forward slash.  Otherwise, any character is legal.
> > >
> > > The interpretation of other characters, as special or not,
> > depends on
> > > the application being used, as mentioned in other posts to this
> > > discussion.
> >
> > To further "round out this discussion": What Bob says is true
> > of UNIX but not
> > Win32.  Win32 does have other characters that it doesn't like
> > in the filenames.
> >  I don't remember off the top of my head what they are, though.

True.  I was trying to get too literal in translating "mimic", here. 
And if I had tried it, I would have seen error messages like "file not
found" for attempts to create a name like "*".

> 
> Off the top of my head, "<", ">", "\", "*", "?", and "|", for fairly
> obvious reasons.  UNIX will have similar problems unless you escape
> the characters.  UNIX will also ley you create file names with non-
> printing characters, which can cause all manner of fun when you try
> to _do_ something with them.  (I just _love_ typing "ls | od -c | less"
> to figure out what is occuring when one of my users manages this feat...)

When I tried to make an illegal name in Explorer, it added ":", "/" and
""" (that is the double quote itself), to your list.

I'm not so sure the reasons are "obvious", though.  It is certainly not
the same reason that there are "similar problems" for UNIX.  As I
remember, the processing method used by DOS is to handle the wild card
interpretation via a "system/function call", so wild cards are handled
outside of the specific application.  An application wanting wild card
processing would need to use the supplied API.  I'm not so sure here
about exact names, but the sequence was to prepare to read names
specified by wild cards, call a "get first matching name" function, then
a "get next matching name" function and continue the get next until a no
match condition was returned.  If the application did not use the API,
the name with wild card characters would be taken literally by it, so
the underlying system needed to protect itself, by checking for and not
allowing invalid characters.

This is not the case on UNIX.  Wild card processing is done at the
application level, by the shell (and others, such as 'find').  If I
should want to, I could write a shell that uses a completely different
set of characters (or none at all), and have it co-exist with a
"standard" shell on any UNIX system available.

This concept also applies to the I/O re-direction symbols you mentioned
in your list.

> 
> Once upon a time, DOS had an undocumented system call that would let
> you change the option delimiter character from "/" to something else
> like "-".  Once you had done that, you could use "\" _or_ "/" in DOS
> path names.  The MKS Toolkit used to use that trick to support UNIX
> style path names in their product.  DOS 5.0 removed the call that let
> you change the option delimiter, but _retained_ the one that let you
> query what it is.  (I don't understand MS at all.)
> 
> 

I had forgotten about this "wonderful" feature.  Ain't DOS great! !-(

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* RE: Windows/Cygwin directory name stuff
  1999-12-16  9:25 ` Andre Oliveira da Costa
  1999-12-16 10:30   ` Bob McGowan
@ 1999-12-31 13:28   ` Andre Oliveira da Costa
  1 sibling, 0 replies; 16+ messages in thread
From: Andre Oliveira da Costa @ 1999-12-31 13:28 UTC (permalink / raw)
  To: Paul Bailey, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

> -----Original Message-----
> From: cygwin-owner@sourceware.cygnus.com
> [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Paul Bailey
> Sent: Thursday, December 16, 1999 3:01 PM
>
[...]
> Is there some mechanism to navigate in bash through a filesystem where
> directories have spaces in their names?  (I mean, I know Unix
> sees separate
> words after a command as an argument list, but that doesn't apply in the
> case of "cd" since I don't think you can cd into two separate directories
> simultaneously, in the same shell, at the same time.)

You see, the shell does exactly what it should do: interpret the command
line, dealing with wildcards and separating arguments to commands. If a
particular command cannot handle multiple arguments (e.g. 'cd'), it's not
the shell's business. If there's an error with the parsing of the command
line, the shell complains; if not, it's the command that complains.

As for the filenames with spaces on it, you can have them on UNIX (and,
therefore, cygwin) too; you just have to tell the shell not to interpret
them, so that they are treated literally as part of the arguments. You do
this by prefixing them with a backslash ('\') or by putting quotes (single
or double) around the names of which they are part of. BTW: this is valid
for other special chars as well (*, [, ], {, } etc.).

HTH,

Andre
--
André Oliveira da Costa
(costa@cade.com.br)


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16  9:30 ` Doug Wyatt
@ 1999-12-31 13:28   ` Doug Wyatt
  0 siblings, 0 replies; 16+ messages in thread
From: Doug Wyatt @ 1999-12-31 13:28 UTC (permalink / raw)
  To: Paul Bailey, cygwin

You're not directly interacting with 'Unix', you're interacting with
a shell program, which has it's own set of rules for interpreting
the commands you enter.  Commands such as 'cd' don't process
the command line, they are invoked by the shell (thought in some
cases, commands may be 'built-in' code included in the shell for
performance reasons, but still the shell processes the command
line before the args are passed to the command).

Try:  cd 'Installer programs'

Regards,
Doug Wyatt

> Hi.
> 
> On my Win98 machine, I have a sub-dir called "Installer Programs".  (I also
> have other directory names, and file names, with spaces in them.)
> 
> I installed Cygwin, which went OK.  I was copying and moving files, and
> cd'ing throughout the filesystem.  No problems.  That is, until this:
> 
> cd Installer Programs
> 
> It wouldn't let me.  I tried
> 
> cd InstallerPrograms
> cd Installer_Programs
> cd Installer-Programs
> 
> Nothing doing.  Eventually I got there through:
> 
> cd Installer*
> 
> Fortunately I only have the one directory starting with the word
> "Installer".
> 
> I searched throught the Web for some kind of information on spaces in Unix
> filenames.  What little turned up was succinct one-liners, to the tune of
> "Don't use white space in filenames."  Good advice for a Unix-only box, but
> I *already* have the directories and files named as they are!
> 
> Is there some mechanism to navigate in bash through a filesystem where
> directories have spaces in their names?  (I mean, I know Unix sees separate
> words after a command as an argument list, but that doesn't apply in the
> case of "cd" since I don't think you can cd into two separate directories
> simultaneously, in the same shell, at the same time.)
> 
> 
> 
> Regards,
> 
> 
> Paul Bailey.
> 
> 
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16 10:55 Earnie Boyd
@ 1999-12-31 13:28 ` Earnie Boyd
  0 siblings, 0 replies; 16+ messages in thread
From: Earnie Boyd @ 1999-12-31 13:28 UTC (permalink / raw)
  To: Bob McGowan, Paul Bailey; +Cc: cygwin

--- Bob McGowan <Robert.McGowan@veritas.com> wrote:
> Andre Oliveira da Costa wrote:
> > 
> > > -----Original Message-----
> > > From: cygwin-owner@sourceware.cygnus.com
> > > [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Paul Bailey
> > > Sent: Thursday, December 16, 1999 3:01 PM
> > >
> > [...]
> > > Is there some mechanism to navigate in bash through a filesystem where
> > > directories have spaces in their names?  (I mean, I know Unix
> > > sees separate
> > > words after a command as an argument list, but that doesn't apply in the
> > > case of "cd" since I don't think you can cd into two separate directories
> > > simultaneously, in the same shell, at the same time.)
> > 
> > You see, the shell does exactly what it should do: interpret the command
> > line, dealing with wildcards and separating arguments to commands. If a
> > particular command cannot handle multiple arguments (e.g. 'cd'), it's not
> > the shell's business. If there's an error with the parsing of the command
> > line, the shell complains; if not, it's the command that complains.
> > 
> > As for the filenames with spaces on it, you can have them on UNIX (and,
> > therefore, cygwin) too; you just have to tell the shell not to interpret
> > them, so that they are treated literally as part of the arguments. You do
> > this by prefixing them with a backslash ('\') or by putting quotes (single
> > or double) around the names of which they are part of. BTW: this is valid
> > for other special chars as well (*, [, ], {, } etc.).
> > 
> > HTH,
> > 
> > Andre
> 
> To round out this discussion, there is ONLY ONE character that UNIX (the
> kernel) and therefor cygwin (the DLL) really cares about as "special"
> and that is the forward slash (/).  This is the delimiter in a path
> between the various names.  You _cannot_ have a name that contains a
> literal forward slash.  Otherwise, any character is legal.
> 
> The interpretation of other characters, as special or not, depends on
> the application being used, as mentioned in other posts to this
> discussion.
> 

To further "round out this discussion": What Bob says is true of UNIX but not
Win32.  Win32 does have other characters that it doesn't like in the filenames.
 I don't remember off the top of my head what they are, though.

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Windows/Cygwin directory name stuff
  1999-12-16  9:02 Paul Bailey
  1999-12-16  9:25 ` Andre Oliveira da Costa
  1999-12-16  9:30 ` Doug Wyatt
@ 1999-12-31 13:28 ` Paul Bailey
  2 siblings, 0 replies; 16+ messages in thread
From: Paul Bailey @ 1999-12-31 13:28 UTC (permalink / raw)
  To: cygwin

Hi.

On my Win98 machine, I have a sub-dir called "Installer Programs".  (I also
have other directory names, and file names, with spaces in them.)

I installed Cygwin, which went OK.  I was copying and moving files, and
cd'ing throughout the filesystem.  No problems.  That is, until this:

cd Installer Programs

It wouldn't let me.  I tried

cd InstallerPrograms
cd Installer_Programs
cd Installer-Programs

Nothing doing.  Eventually I got there through:

cd Installer*

Fortunately I only have the one directory starting with the word
"Installer".

I searched throught the Web for some kind of information on spaces in Unix
filenames.  What little turned up was succinct one-liners, to the tune of
"Don't use white space in filenames."  Good advice for a Unix-only box, but
I *already* have the directories and files named as they are!

Is there some mechanism to navigate in bash through a filesystem where
directories have spaces in their names?  (I mean, I know Unix sees separate
words after a command as an argument list, but that doesn't apply in the
case of "cd" since I don't think you can cd into two separate directories
simultaneously, in the same shell, at the same time.)



Regards,


Paul Bailey.





--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16 10:30   ` Bob McGowan
@ 1999-12-31 13:28     ` Bob McGowan
  0 siblings, 0 replies; 16+ messages in thread
From: Bob McGowan @ 1999-12-31 13:28 UTC (permalink / raw)
  To: Paul Bailey; +Cc: cygwin

Andre Oliveira da Costa wrote:
> 
> > -----Original Message-----
> > From: cygwin-owner@sourceware.cygnus.com
> > [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Paul Bailey
> > Sent: Thursday, December 16, 1999 3:01 PM
> >
> [...]
> > Is there some mechanism to navigate in bash through a filesystem where
> > directories have spaces in their names?  (I mean, I know Unix
> > sees separate
> > words after a command as an argument list, but that doesn't apply in the
> > case of "cd" since I don't think you can cd into two separate directories
> > simultaneously, in the same shell, at the same time.)
> 
> You see, the shell does exactly what it should do: interpret the command
> line, dealing with wildcards and separating arguments to commands. If a
> particular command cannot handle multiple arguments (e.g. 'cd'), it's not
> the shell's business. If there's an error with the parsing of the command
> line, the shell complains; if not, it's the command that complains.
> 
> As for the filenames with spaces on it, you can have them on UNIX (and,
> therefore, cygwin) too; you just have to tell the shell not to interpret
> them, so that they are treated literally as part of the arguments. You do
> this by prefixing them with a backslash ('\') or by putting quotes (single
> or double) around the names of which they are part of. BTW: this is valid
> for other special chars as well (*, [, ], {, } etc.).
> 
> HTH,
> 
> Andre

To round out this discussion, there is ONLY ONE character that UNIX (the
kernel) and therefor cygwin (the DLL) really cares about as "special"
and that is the forward slash (/).  This is the delimiter in a path
between the various names.  You _cannot_ have a name that contains a
literal forward slash.  Otherwise, any character is legal.

The interpretation of other characters, as special or not, depends on
the application being used, as mentioned in other posts to this
discussion.

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
       [not found] <65CAA822B707D211AD430008C7F40FED748770@EXCHANGERSW2>
@ 1999-12-16 14:55 ` Bob McGowan
  1999-12-31 13:28   ` Bob McGowan
  0 siblings, 1 reply; 16+ messages in thread
From: Bob McGowan @ 1999-12-16 14:55 UTC (permalink / raw)
  To: McCunney, Dennis; +Cc: Cygwin

"McCunney, Dennis" wrote:
> 
> > -----Original Message-----
> > From: Earnie Boyd [ mailto:earnie_boyd@yahoo.com ]
> > Sent: Thursday, December 16, 1999 1:55 PM
> > To: Bob McGowan; Paul Bailey
> > Cc: cygwin@sourceware.cygnus.com
> > Subject: Re: Windows/Cygwin directory name stuff
> >
> > > To round out this discussion, there is ONLY ONE character
> > that UNIX (the
> > > kernel) and therefor cygwin (the DLL) really cares about as
> > "special"
> > > and that is the forward slash (/).  This is the delimiter in a path
> > > between the various names.  You _cannot_ have a name that contains a
> > > literal forward slash.  Otherwise, any character is legal.
> > >
> > > The interpretation of other characters, as special or not,
> > depends on
> > > the application being used, as mentioned in other posts to this
> > > discussion.
> >
> > To further "round out this discussion": What Bob says is true
> > of UNIX but not
> > Win32.  Win32 does have other characters that it doesn't like
> > in the filenames.
> >  I don't remember off the top of my head what they are, though.

True.  I was trying to get too literal in translating "mimic", here. 
And if I had tried it, I would have seen error messages like "file not
found" for attempts to create a name like "*".

> 
> Off the top of my head, "<", ">", "\", "*", "?", and "|", for fairly
> obvious reasons.  UNIX will have similar problems unless you escape
> the characters.  UNIX will also ley you create file names with non-
> printing characters, which can cause all manner of fun when you try
> to _do_ something with them.  (I just _love_ typing "ls | od -c | less"
> to figure out what is occuring when one of my users manages this feat...)

When I tried to make an illegal name in Explorer, it added ":", "/" and
""" (that is the double quote itself), to your list.

I'm not so sure the reasons are "obvious", though.  It is certainly not
the same reason that there are "similar problems" for UNIX.  As I
remember, the processing method used by DOS is to handle the wild card
interpretation via a "system/function call", so wild cards are handled
outside of the specific application.  An application wanting wild card
processing would need to use the supplied API.  I'm not so sure here
about exact names, but the sequence was to prepare to read names
specified by wild cards, call a "get first matching name" function, then
a "get next matching name" function and continue the get next until a no
match condition was returned.  If the application did not use the API,
the name with wild card characters would be taken literally by it, so
the underlying system needed to protect itself, by checking for and not
allowing invalid characters.

This is not the case on UNIX.  Wild card processing is done at the
application level, by the shell (and others, such as 'find').  If I
should want to, I could write a shell that uses a completely different
set of characters (or none at all), and have it co-exist with a
"standard" shell on any UNIX system available.

This concept also applies to the I/O re-direction symbols you mentioned
in your list.

> 
> Once upon a time, DOS had an undocumented system call that would let
> you change the option delimiter character from "/" to something else
> like "-".  Once you had done that, you could use "\" _or_ "/" in DOS
> path names.  The MKS Toolkit used to use that trick to support UNIX
> style path names in their product.  DOS 5.0 removed the call that let
> you change the option delimiter, but _retained_ the one that let you
> query what it is.  (I don't understand MS at all.)
> 
> 

I had forgotten about this "wonderful" feature.  Ain't DOS great! !-(

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
@ 1999-12-16 10:55 Earnie Boyd
  1999-12-31 13:28 ` Earnie Boyd
  0 siblings, 1 reply; 16+ messages in thread
From: Earnie Boyd @ 1999-12-16 10:55 UTC (permalink / raw)
  To: Bob McGowan, Paul Bailey; +Cc: cygwin

--- Bob McGowan <Robert.McGowan@veritas.com> wrote:
> Andre Oliveira da Costa wrote:
> > 
> > > -----Original Message-----
> > > From: cygwin-owner@sourceware.cygnus.com
> > > [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Paul Bailey
> > > Sent: Thursday, December 16, 1999 3:01 PM
> > >
> > [...]
> > > Is there some mechanism to navigate in bash through a filesystem where
> > > directories have spaces in their names?  (I mean, I know Unix
> > > sees separate
> > > words after a command as an argument list, but that doesn't apply in the
> > > case of "cd" since I don't think you can cd into two separate directories
> > > simultaneously, in the same shell, at the same time.)
> > 
> > You see, the shell does exactly what it should do: interpret the command
> > line, dealing with wildcards and separating arguments to commands. If a
> > particular command cannot handle multiple arguments (e.g. 'cd'), it's not
> > the shell's business. If there's an error with the parsing of the command
> > line, the shell complains; if not, it's the command that complains.
> > 
> > As for the filenames with spaces on it, you can have them on UNIX (and,
> > therefore, cygwin) too; you just have to tell the shell not to interpret
> > them, so that they are treated literally as part of the arguments. You do
> > this by prefixing them with a backslash ('\') or by putting quotes (single
> > or double) around the names of which they are part of. BTW: this is valid
> > for other special chars as well (*, [, ], {, } etc.).
> > 
> > HTH,
> > 
> > Andre
> 
> To round out this discussion, there is ONLY ONE character that UNIX (the
> kernel) and therefor cygwin (the DLL) really cares about as "special"
> and that is the forward slash (/).  This is the delimiter in a path
> between the various names.  You _cannot_ have a name that contains a
> literal forward slash.  Otherwise, any character is legal.
> 
> The interpretation of other characters, as special or not, depends on
> the application being used, as mentioned in other posts to this
> discussion.
> 

To further "round out this discussion": What Bob says is true of UNIX but not
Win32.  Win32 does have other characters that it doesn't like in the filenames.
 I don't remember off the top of my head what they are, though.

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16  9:25 ` Andre Oliveira da Costa
@ 1999-12-16 10:30   ` Bob McGowan
  1999-12-31 13:28     ` Bob McGowan
  1999-12-31 13:28   ` Andre Oliveira da Costa
  1 sibling, 1 reply; 16+ messages in thread
From: Bob McGowan @ 1999-12-16 10:30 UTC (permalink / raw)
  To: Paul Bailey; +Cc: cygwin

Andre Oliveira da Costa wrote:
> 
> > -----Original Message-----
> > From: cygwin-owner@sourceware.cygnus.com
> > [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Paul Bailey
> > Sent: Thursday, December 16, 1999 3:01 PM
> >
> [...]
> > Is there some mechanism to navigate in bash through a filesystem where
> > directories have spaces in their names?  (I mean, I know Unix
> > sees separate
> > words after a command as an argument list, but that doesn't apply in the
> > case of "cd" since I don't think you can cd into two separate directories
> > simultaneously, in the same shell, at the same time.)
> 
> You see, the shell does exactly what it should do: interpret the command
> line, dealing with wildcards and separating arguments to commands. If a
> particular command cannot handle multiple arguments (e.g. 'cd'), it's not
> the shell's business. If there's an error with the parsing of the command
> line, the shell complains; if not, it's the command that complains.
> 
> As for the filenames with spaces on it, you can have them on UNIX (and,
> therefore, cygwin) too; you just have to tell the shell not to interpret
> them, so that they are treated literally as part of the arguments. You do
> this by prefixing them with a backslash ('\') or by putting quotes (single
> or double) around the names of which they are part of. BTW: this is valid
> for other special chars as well (*, [, ], {, } etc.).
> 
> HTH,
> 
> Andre

To round out this discussion, there is ONLY ONE character that UNIX (the
kernel) and therefor cygwin (the DLL) really cares about as "special"
and that is the forward slash (/).  This is the delimiter in a path
between the various names.  You _cannot_ have a name that contains a
literal forward slash.  Otherwise, any character is legal.

The interpretation of other characters, as special or not, depends on
the application being used, as mentioned in other posts to this
discussion.

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Windows/Cygwin directory name stuff
  1999-12-16  9:02 Paul Bailey
  1999-12-16  9:25 ` Andre Oliveira da Costa
@ 1999-12-16  9:30 ` Doug Wyatt
  1999-12-31 13:28   ` Doug Wyatt
  1999-12-31 13:28 ` Paul Bailey
  2 siblings, 1 reply; 16+ messages in thread
From: Doug Wyatt @ 1999-12-16  9:30 UTC (permalink / raw)
  To: Paul Bailey, cygwin

You're not directly interacting with 'Unix', you're interacting with
a shell program, which has it's own set of rules for interpreting
the commands you enter.  Commands such as 'cd' don't process
the command line, they are invoked by the shell (thought in some
cases, commands may be 'built-in' code included in the shell for
performance reasons, but still the shell processes the command
line before the args are passed to the command).

Try:  cd 'Installer programs'

Regards,
Doug Wyatt

> Hi.
> 
> On my Win98 machine, I have a sub-dir called "Installer Programs".  (I also
> have other directory names, and file names, with spaces in them.)
> 
> I installed Cygwin, which went OK.  I was copying and moving files, and
> cd'ing throughout the filesystem.  No problems.  That is, until this:
> 
> cd Installer Programs
> 
> It wouldn't let me.  I tried
> 
> cd InstallerPrograms
> cd Installer_Programs
> cd Installer-Programs
> 
> Nothing doing.  Eventually I got there through:
> 
> cd Installer*
> 
> Fortunately I only have the one directory starting with the word
> "Installer".
> 
> I searched throught the Web for some kind of information on spaces in Unix
> filenames.  What little turned up was succinct one-liners, to the tune of
> "Don't use white space in filenames."  Good advice for a Unix-only box, but
> I *already* have the directories and files named as they are!
> 
> Is there some mechanism to navigate in bash through a filesystem where
> directories have spaces in their names?  (I mean, I know Unix sees separate
> words after a command as an argument list, but that doesn't apply in the
> case of "cd" since I don't think you can cd into two separate directories
> simultaneously, in the same shell, at the same time.)
> 
> 
> 
> Regards,
> 
> 
> Paul Bailey.
> 
> 
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* RE: Windows/Cygwin directory name stuff
  1999-12-16  9:02 Paul Bailey
@ 1999-12-16  9:25 ` Andre Oliveira da Costa
  1999-12-16 10:30   ` Bob McGowan
  1999-12-31 13:28   ` Andre Oliveira da Costa
  1999-12-16  9:30 ` Doug Wyatt
  1999-12-31 13:28 ` Paul Bailey
  2 siblings, 2 replies; 16+ messages in thread
From: Andre Oliveira da Costa @ 1999-12-16  9:25 UTC (permalink / raw)
  To: Paul Bailey, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

> -----Original Message-----
> From: cygwin-owner@sourceware.cygnus.com
> [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Paul Bailey
> Sent: Thursday, December 16, 1999 3:01 PM
>
[...]
> Is there some mechanism to navigate in bash through a filesystem where
> directories have spaces in their names?  (I mean, I know Unix
> sees separate
> words after a command as an argument list, but that doesn't apply in the
> case of "cd" since I don't think you can cd into two separate directories
> simultaneously, in the same shell, at the same time.)

You see, the shell does exactly what it should do: interpret the command
line, dealing with wildcards and separating arguments to commands. If a
particular command cannot handle multiple arguments (e.g. 'cd'), it's not
the shell's business. If there's an error with the parsing of the command
line, the shell complains; if not, it's the command that complains.

As for the filenames with spaces on it, you can have them on UNIX (and,
therefore, cygwin) too; you just have to tell the shell not to interpret
them, so that they are treated literally as part of the arguments. You do
this by prefixing them with a backslash ('\') or by putting quotes (single
or double) around the names of which they are part of. BTW: this is valid
for other special chars as well (*, [, ], {, } etc.).

HTH,

Andre
--
André Oliveira da Costa
(costa@cade.com.br)


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* RE: Windows/Cygwin directory name stuff
@ 1999-12-16  9:05 Halim, Salman
  1999-12-31 13:28 ` Halim, Salman
  0 siblings, 1 reply; 16+ messages in thread
From: Halim, Salman @ 1999-12-16  9:05 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com '

try putting the file/directory name in quotes (single or double) or escaping
the spaces using a backslash.

hope this helps,

salman.

-----Original Message-----
From: Paul Bailey
To: cygwin@sourceware.cygnus.com
Sent: 12/16/99 12:00 PM
Subject: Windows/Cygwin directory name stuff

Hi.

On my Win98 machine, I have a sub-dir called "Installer Programs".  (I
also
have other directory names, and file names, with spaces in them.)

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Windows/Cygwin directory name stuff
@ 1999-12-16  9:02 Paul Bailey
  1999-12-16  9:25 ` Andre Oliveira da Costa
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Paul Bailey @ 1999-12-16  9:02 UTC (permalink / raw)
  To: cygwin

Hi.

On my Win98 machine, I have a sub-dir called "Installer Programs".  (I also
have other directory names, and file names, with spaces in them.)

I installed Cygwin, which went OK.  I was copying and moving files, and
cd'ing throughout the filesystem.  No problems.  That is, until this:

cd Installer Programs

It wouldn't let me.  I tried

cd InstallerPrograms
cd Installer_Programs
cd Installer-Programs

Nothing doing.  Eventually I got there through:

cd Installer*

Fortunately I only have the one directory starting with the word
"Installer".

I searched throught the Web for some kind of information on spaces in Unix
filenames.  What little turned up was succinct one-liners, to the tune of
"Don't use white space in filenames."  Good advice for a Unix-only box, but
I *already* have the directories and files named as they are!

Is there some mechanism to navigate in bash through a filesystem where
directories have spaces in their names?  (I mean, I know Unix sees separate
words after a command as an argument list, but that doesn't apply in the
case of "cd" since I don't think you can cd into two separate directories
simultaneously, in the same shell, at the same time.)



Regards,


Paul Bailey.





--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~1999-12-31 13:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-16  9:18 Windows/Cygwin directory name stuff Earnie Boyd
1999-12-31 13:28 ` Earnie Boyd
     [not found] <65CAA822B707D211AD430008C7F40FED748770@EXCHANGERSW2>
1999-12-16 14:55 ` Bob McGowan
1999-12-31 13:28   ` Bob McGowan
  -- strict thread matches above, loose matches on Subject: below --
1999-12-16 10:55 Earnie Boyd
1999-12-31 13:28 ` Earnie Boyd
1999-12-16  9:05 Halim, Salman
1999-12-31 13:28 ` Halim, Salman
1999-12-16  9:02 Paul Bailey
1999-12-16  9:25 ` Andre Oliveira da Costa
1999-12-16 10:30   ` Bob McGowan
1999-12-31 13:28     ` Bob McGowan
1999-12-31 13:28   ` Andre Oliveira da Costa
1999-12-16  9:30 ` Doug Wyatt
1999-12-31 13:28   ` Doug Wyatt
1999-12-31 13:28 ` Paul Bailey

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 read-only IMAP folder(s) and NNTP newsgroup(s).