1
$ pwd
/home/Thomas/Utveckling/Cgreen/thoni56/cgreen
$ realpath .
/cygdrive/c/Users/Thomas/Utveckling/Cgreen/thoni56/cgreen
$ cygpath -a .
/cygdrive/c/Users/Thomas/Utveckling/Cgreen/thoni56/cgreen/

Why is this? Why is absolute path from the root /cygdrive and not /?

How do I get an absolute path that starts with /home from a relative path, such as .., if I'm in that tree?

thoni56
  • 3,145
  • 3
  • 31
  • 49

1 Answers1

1

It is the effect of the presence of a link in the path. Eg:

ls -ld /pub /tmp
lrwxrwxrwx  1 marco Administrators 19 Jun 26  2014 /pub -> /cygdrive/e/cyg_pub
drwxrwxrwx+ 1 marco Administrators  0 May  2 17:49 /tmp

$ realpath /pub /tmp
/cygdrive/e/cyg_pub
/tmp
matzeri
  • 8,062
  • 2
  • 15
  • 16