2

Possible Duplicate:
C/C++: How to obtain the full path of current directory?

It is simple to figure out the directory which a bash script resides in, but I'm wondering if it is true for a c binary code.

Community
  • 1
  • 1
zzk
  • 1,347
  • 9
  • 15
  • 1
    What do you mean with the qualifier "binary"? If you want the directory your code is executing in it rather straightforward. Check out: http://stackoverflow.com/questions/143174/c-c-how-to-obtain-the-full-path-of-current-directory – Mikhail Jul 11 '11 at 18:09
  • 1
    Here is a similar question http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe – Joe Jul 11 '11 at 18:10

0 Answers0