GitHub user Ben-Zvi opened a pull request:

    Added -P to CD handle symbolic links in PWD

    The use of plain "cd" with a symbolic link to a directory maintains the 
logical name (i.e., includes the link's name), hence in a script, when a path 
is set using "pwd", that path includes the link instead of the full physical 
path.  This is a problem when the path is used (e.g in "cd .." -- which ends in 
the wrong place !!)
       Adding the "-P" option makes "cd" follow the physical name. For example:
    [mapr@mfs91 ~]$ ls -l ~/drill/bin
    lrwxrwxrwx 1 mapr mapr 79 Oct 18 16:55 /home/mapr/drill/bin -> 
    [mapr@mfs91 ~]$ cd ~/drill/bin ; pwd
    [mapr@mfs91 bin]$ cd -P ~/drill/bin ; pwd
    @paul-rogers please review 

You can merge this pull request into a Git repository by running:

    $ git pull DRILL-4921

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #623
commit aff976385b8cb5d6906f75eeeed7578c10ddbebb
Author: Boaz Ben-Zvi <>
Date:   2016-10-18T23:01:11Z

    Added -P to handle symbolic links


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to