Messages in this thread | | | Date | Thu, 23 Jun 2011 16:52:06 +0200 | From | Lars Täuber <> | Subject | Re: extra slash in current path |
| |
Am Thu, 23 Jun 2011 18:31:06 +0400 Michael Tokarev <mjt@tls.msk.ru> schrieb: > 23.06.2011 18:11, yuyichao-mit wrote: > > >>>> $ cd // > >>>> $ pwd > >>>> // > > The current directory is cached in $PWD environment > variable by shell (bash at least). This variable is > checked in glibc (getcwd() et al) - if it is set and > stat($PWD) is the same as stat("."), that value is used.
It also is somehow cached inside bash/dash for it's built in commands. $ cd // $ export PWD=5 $ pwd // $ /bin/pwd /
Regards Lars
| |