title: How to open a file with it's relative path in Linux?
body: <p>I have a program which opens a file by using a relative path (for instance '..').</p>
  
  <p>Now the problem is, when I execute the program from another directory, the relative path is not relative to the program but relative to the working directory. Thus, if I start the program with '/path/to/program/myprog' it fails to find the file.</p>
  
  <p>Is there a way to execute the program independently of the working directory? Id est, as If the working directory were the directory where the program is located? Or am I just thinking in a too complicated way and there is a much easier way to refer to a file, which location is only known by its path relative to the path of the program file?</p>