public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 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: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: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 --
     [not found] <65CAA822B707D211AD430008C7F40FED748770@EXCHANGERSW2>
1999-12-16 14:55 ` Windows/Cygwin directory name stuff Bob McGowan
1999-12-31 13:28   ` Bob McGowan
1999-12-16 10:55 Earnie Boyd
1999-12-31 13:28 ` Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
1999-12-16  9:18 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).