-P option for “cd” or “pwd”: show real path or move upper directory under the symlinked directory.

It’s not bring you to the upper directory when you live linked(symlinked) directory typing “cd ..”.

even it shows unreal path when you type “pwd” under the softlink(symlinked) directory.

Solution!! -> add “-P” option.(ref)


1) it shows real path where you are.

$ pwd -P


2) it brings you to exact parent directory.

$ cd -P ..


So, Simple 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.