B19: cd command doesn't always do what I expect

David Campbell david@pastornet.net.au
Fri Aug 28 02:24:00 GMT 1998


Hi,

I'm a little unclear about what a command like "cd //c" means
under CygWin32.  I would expect it to mean "change to the
root directory of drive c".  That's not what I get.

For example:

    bash-2.01$ pwd
    //d/Program Files/JacORB_0.9e
    bash-2.01$ cd //c
    bash-2.01$ ls
    David Personal.lnk  MappletKit.lnk      Scribble.txt
    Home.lnk            My Briefcase        TRMPTEL.EXE
    bash-2.01$ pwd
    //c

At this point, pwd reports we are in //c, but we are actually
in //c/winnt/Profiles/david/Desktop.

    bash-2.01$ cd //c/winnt/Profiles/david/Desktop
    bash-2.01$ ls
    David Personal.lnk  MappletKit.lnk      Scribble.txt
    Home.lnk            My Briefcase        TRMPTEL.EXE
    bash-2.01$ pwd
    //c/winnt/Profiles/david/Desktop
    bash-2.01$ cd ..
    bash-2.01$ pwd
    //c/winnt/Profiles/david

Lets try something else:

    bash-2.01$ cd //c/winnt
    bash-2.01$ pwd
    //c/winnt
    bash-2.01$ ls
    <lists the contents of //c/winnt>
    bash-2.01$ cd ..
    bash-2.01$ pwd
    //c
    bash-2.01$ ls
    <wrongly lists the contents of //c/winnt>

Note that in the above, the last cd command doesn't seemed
to have actually worked.

Is this a bug?

Regards,
-- David Campbell


More information about the Cygwin mailing list