Peter T. Breuer <ptb.RemoveThis@oboe.it.uc3m.es> wrote:
> ... et al. <look.RemoveThis@sig.bcause.this.is.invalid> wrote:
> > Joachim Feise <reply.RemoveThis@the.newsgroup> wrote:
>
> >> Simply use URLs correctly, i.e., add a slash if your URL points to
> >> a directory.
>
> > I totally sympathise with the explanation by you and Sybren Stuvel. And
> > the reasoning why slashes (instead of backslashes or colons) is used, is
> > that internet, the HTTProtocol and webbrowsing all where developed on
> > systems running Unix-style OS's, right?
>
> No. Quite the opposite. The slash is so that systems which don't have
> the same kind of file structure know to do a getdents instead of a
> lstat. Remember that URLs have to work on embedded smartcard
> applications too, and there ain't a lot of code available in your
> magnetic stripe.
>
Oops. ¿The opposite?, that's bad. I'll put it in the pile of things to
look up.
> Anyway, unix servers generally translate to the right call for you.
>
> > As a person that want's to understand Linux, this then brings me to be
> > harassed by another question.
>
> > Then, .. in the name of logic .., shouldn't the same rule apply to all
> > paths in Unix (read Linux) as well? As in, for example, "You would
>
> Paths are a question for your shell, not of unix. But yes, there is a
> posix shell, and ...
>
> > usually find foo in /bar/ or somtimes under /bar/subbar/" But i don't
>
> .. this is quite correct usage.
Thanks then, if no one says otherwise, i'll continue doing that way.
> The shell normally translates for you, however.
That sounds awfully analogous to what a web-server does if you point
your browser to a directory and don't provide the trailing slash.
> There are a few occasions when you will get different answers
> from ls foo than ls foo/, but not many. ls -l of a softlink to a
> directory springs to mind.
>
Interesting.
> > I'm afraid the answer might have to do with the "in Unix everything is a
> > file" statement? As in, also directories are files. But even more
> > unlogical then!, there _is one_ directory where the trailing slash
> > actually always _is_ used [1].
>
> I don't understand your problem.
Well, thanks for providing comments and insights anyway.
> You are basing your reasoning on false aprehensions.
Possibly. I was posting so i wouldn't continue to do that, if that is
the case. Show me the errors and i'll gladly ... ¡hey wait! Weren't you
agreeing with that trailing slashes were "quite correct usage" above?
> And even if your hypoteheses were right, so what? The shell is free to
> help you out whenever it feels like.
>
I like to voluntarily write the trailing slashes in linux paths, (and
continue to feel justly saddened by why others don't do the same, )if
that is the "correct" way to do it. Just like i voluntarily write the
trailing slashes in URL paths. I don't want the shell, or web-server, to
have to help me out when i so easily can do it the "correct" way myself.
>
> > [1] That would be the root-directory, the slash-directory, the "/".
>
> No - that would be "//" following your nomenclature.
No, au contraire.
With "my" nomenclature, the name of the root-directory is "" (in
some Unix geekiness style ;-/) and thus the path would be written "/"
like it usually is. The path of the directory named "bar" placed in the
root-directory would then be "/bar/" if written "correctly", but usually
sloppily written as "/bar" by most users, because they get away with it,
because as you say the shell steps in and helps the user out by
"normally translating" for him/her.
Opposite, if slashes were only, in the wording of Joachim's
followup, "a generic separator in a hierarchical tree of collections",
and not to also be used as indicators of "pointing to a directory". and
the root-directory is named "/" it's path again is correctly written as
"/", with no trailing slash. But then the path for the directory named
"bar" there-in ought to be written "//bar", because you have to have a
separator between the directories in the path. And that is not how it
usually is written.
> Indeed, it is, in URLs. Try
>
> lynx file:///
>
> and
>
> lynx file://
>
> and tell me which works as you expect!
>
Yeah, i've seen them triple slashes at times. My brain isn't wired to
parse them though. I understand the two first, i think, but the last
slash always seems one too many to me.
May have something to do with me thinking the root-directory is named ""
and not "/"?
Again, the pile of things to look up, for me to understand, grows...
--
Please followup in newsgroup.
E-mail address is invalid due to spam-control.