title: Why can't I work with files in ".." from within a symbolic link?
body: <p>I have the following directory structure:</p>
  
  <pre><code>misha@misha-lmd:~/tmp$ ls -l
  total 4.0K
  -rw-r--r-- 1 misha lmd 21 Feb 18 21:00 hello.py
  lrwxrwxrwx 1 misha lmd 20 Feb 18 21:01 symlink -&gt; /home/misha/nobackup/
  </code></pre>
  
  <p>Next, I try the following:</p>
  
  <pre><code>misha@misha-lmd:~/tmp$ cd symlink
  misha@misha-lmd:~/tmp/symlink$ cat ../hello.py 
  cat: ../hello.py: No such file or directory
  </code></pre>
  
  <p>Why doesn't this work?</p>
  
  <p>If I do this instead:</p>
  
  <pre><code>misha@misha-lmd:~/tmp/symlink$ cd ..
  misha@misha-lmd:~/tmp$ cat hello.py
  print "Hello World!"
  </code></pre>
  
  <p>Then all is well.  cd handles .. properly, but cat doesn't.  What is this sorcery, and how do I make things work the way I want them to?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>OK, thanks to some of the answers here, I've found out a bit more about what's going on.  First, <code>cd</code> is not actually an executable, it is a built-in command of the shell (in this case, bash):</p>
  
  <pre><code>misha@misha-lmd:~/tmp$ type cd
  cd is a shell builtin
  </code></pre>
  
  <p>If you <code>man bash</code>, you can find all about the environment variables that bash uses for its housekeeping, including moving around directories.  There are other built-ins, like <code>pwd</code>, that have counterparts that are actually executables:</p>
  
  <pre><code>misha@misha-lmd:~/tmp/symlink$ type pwd
  pwd is a shell builtin
  misha@misha-lmd:~/tmp/symlink$ /bin/pwd
  /home/misha/nobackup
  misha@misha-lmd:~/tmp/symlink$ /bin/pwd -L
  /home/misha/tmp/symlink
  </code></pre>
  
  <p>The <code>/bin/pwd</code> executable prints the physical path by default, but can also print the logical path given the `-L' switch.  Similarly, when I try to do:</p>
  
  <pre><code>misha@misha-lmd:~/tmp/symlink$ cat ../hello.py 
  cat: ../hello.py: No such file or directory
  </code></pre>
  
  <p>things are failing because <code>..</code> is being interpreted as the <em>physical</em> parent directory, not the <em>logical one</em>.  This allows me to <strong>refine my question</strong> as:</p>
  
  <p>When I specify a command-line argument to an executable, how can I get <code>..</code> to mean the logical parent, not the physical one?</p>