1

I have following symlink in my home directory.

lrwxrwxrwx 1 mtk mtk   43 Aug  8 20:35 tripple-bit -> /media/mtk/study/Collage/docs

I use the symlink to navigate to the docs folder directly. But now, while being in docs folder, I want to move to it's parent directory i.e. /media/mtk/study/Collage in this case.

How can I achieve this?

On giving cd .., it comes back to the home directory and not the parent directory.

chaos
  • 48,171
mtk
  • 27,530
  • 35
  • 94
  • 130

1 Answers1

2

Just use:

cd -P ..

From the bash manpage:

The -P option says to use the physical directory structure instead of following symbolic links.

chaos
  • 48,171