Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
>ls -alt
lrwxrwxrwx  1 root root   67 Aug  3 10:49 myFile.txt -> /some/where/else/myFile.txt

i want to cd to


by typing something like

follow myFile.txt

does Unix have something like that?

share|improve this question
up vote 1 down vote accepted

You could define a function:

follow () { cd $(dirname $(readlink -e "$1")); }
share|improve this answer
looks good, thanks – jermdemo Aug 4 '10 at 17:25

Your Answer


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.