Re: [osol-help] Accessing directories

2008-03-08 Thread Andrew C. Henle
Your command shell is parsing Los Angeles as two arguments, not one.  You 
either need to escape the space using a backslash, or quote the argument.  For 
example:

ls Los\ Angeles

or

ls "Los Angeles"

Look up the "IFS" variable in the man pages for sh and bash.
 
 
This message posted from opensolaris.org
___
opensolaris-help mailing list
opensolaris-help@opensolaris.org


Re: [osol-help] Accessing directories

2008-03-08 Thread Uwe Dippel
On Sat, 08 Mar 2008 03:01:18 -0800, Emmanuel De Paepe wrote:

> When trying to access a directory looking like this:
> 'Los Angeles' I received this error: too many arguments.

It is an 'old' thing; in principle the introduction of 'blank' as allowed
character in a filename was about the silliest 'invention' by the
respective party ever.
Here is why, to prove my point:

Imagine, you have a directory containing two files,
one
one two
If you wanted to copy the file 'one' to file 'three', the command is
cp one three
Fine.
Next, you type the command
cp one two four
Huh? *Nobody* in this world can know, if you wanted to copy file 'one'
into file 'two four'; *or* if you wanted to copy file 'one two' into file
'four'.
The misery is that the blank is defined to distinguish options/parameters.
Once those idiots decided that it is also allowed as characters in file
names, the matter became ambiguous.

You can still use it, though, but you need to indicate the correct
association, and use quotes, like
cp "one two" four
or
cp one "two four".
In your case: 
cd "Los Angeles" will work.

Again, FYI, this has nothing to do with Solaris. At times I need to use
the quotes on Windows, BSD, Linux as well.

Welcome to the club,

Uwe



___
opensolaris-help mailing list
opensolaris-help@opensolaris.org


[osol-help] Accessing directories

2008-03-08 Thread Emmanuel De Paepe
When trying to access a directory looking like this:
'Los Angeles' I received this error: too many arguments.

When I changed the directory (by graphical way) to
this 'Los_Angeles' the error is gone.

What is going wrong when an 'empty' character is added?
 
 
This message posted from opensolaris.org
___
opensolaris-help mailing list
opensolaris-help@opensolaris.org