Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 1996 00:51:57 +0100 (MET)
From:      Helbig@MX.BA-Stuttgart.De
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/2331: strange output of sh's pwd on symlinked directories
Message-ID:  <199612302351.AAA00671@helbig.informatik.ba-stuttgart.de>
Resent-Message-ID: <199612310000.QAA29570@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2331
>Category:       bin
>Synopsis:       strange output of sh's pwd on symlinked directories
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 16:00:01 PST 1996
>Last-Modified:
>Originator:     Wolfgang Helbig
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

>Description:
The shell builtin prints wrong names if you cd .. up crossing a
symlinked directory.

>How-To-Repeat:
Assuming standard configuration, i. e.  /home is a symbolic link to /usr/home:
$ cd /home
$ pwd
/home
$ cd ..
$ pwd 
/
^
$ /bin/pwd
/usr
^^^^
If you do an ls here, you get the contents of /usr and not of / as is shown
by pwd.
The first time I did this, I thought I've overridden / by /usr.

>Fix:
	
when in doubt, use /bin/pwd.  
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612302351.AAA00671>