[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Mon Mar 15 17:31:45 2004 -->
- <!--x-from-r13: owbea ng fppf.fjneguzber.rqh (Pwbea Rvggzre-Dbpur) -->
- <!--x-message-id: [email protected]-a-geek.com -->
- <!--x-reference: [email protected] -->
- <!--x-reference: D4CEC148-76CE-11D8-B8C2-[email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Quick LInux Quiz -->
- <li><em>date</em>: Mon Mar 15 17:31:45 2004</li>
- <li><em>from</em>: bjorn at sccs.swarthmore.edu (Bjorn Dittmer-Roche)</li>
- <li><em>in-reply-to</em>: <<a href="msg00530.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00529.html">[email protected]</a>> <<a href="msg00530.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Quick LInux Quiz</li>
> isn't that the same thing as cd /?
>
> at least that's what I see.
>
> Jason
>
>
> On Mar 15, 2004, at 5:13 PM, Michael D. Hirsch wrote:
>
> > Quick! What is the effect of "cd //"? I sure guessed wrong.
> >
> > I don't really understand what is happening when I do that on RH under
> > bash.
> > Can anyone explain this?
this:
$ cd /
and this:
$ cd //
should both take you to the root directory. This is because POSIX mandates
that multiple slashes in a row must be equivilant to a single slash. This
is handy in cases like this:
psedocode:
path1 = "/path/1"
path2 = "/path/2/"
randompath = pickAPathAtRandom( path1, path2 )
afile = "file.name"
fullpath = randompath + "/" + afile
I think there is a limit to the number of consecutive /'s that POSIX
requires resolving to a single /.
bjorn
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00529" href="msg00529.html">[ale] Quick LInux Quiz</a></strong>
<ul><li><em>From:</em> mhirsch at nubridges.com (Michael D. Hirsch)</li></ul></li>
<li><strong><a name="00530" href="msg00530.html">[ale] Quick LInux Quiz</a></strong>
<ul><li><em>From:</em> vinson.lists at charter.net (Jason Vinson)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00533.html">[ale] GPL Question.</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00535.html">[ale] "What's So Bad About Microsoft?"</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00580.html">//hostname/ shares (Was: Re: [ale] Quick LInux Quiz)</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00532.html">[ale] Quick LInux Quiz</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00534"><strong>Date</strong></a></li>
<li><a href="threads.html#00534"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>