Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Say I have folder stucture:

|- dir1/
|  |-  sub1/
|
|- dir2/
   |- sub1link -> /dir1/sub1/

and my current working directory is sub1link, is there a quick way to either:

  • change directory to link source parent (i.e something similar to cd .. but take the user to /dir1/

  • change directory to link source (i.e switch from /dir2/sub1link/ straight to /dir1/sub1

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Use cd -P ... Run help cd for more details. -L follows symlinks and is usually the default behavior, whereas -P uses the physical directory structure.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.