1

Current pwd:

C:

I created a sample symlink say:

mklink /j C:\a C:\b\c

Thereafter after i navigate using the symlink:

cd a

If I execute the 'pwd' command, I see the path as C:\a Is there a way so that I can see the actual path C:\b\c?

Alternatively please point me to the thread if this question has been already answered. I could not locate any relevant answers. Thanks.

Coder
  • 456
  • 1
  • 4
  • 12
  • This might answer your question http://superuser.com/questions/106552/how-do-i-figure-out-if-a-link-is-a-symbolic-link-a-hard-link-or-a-directory-ju?rq=1 – Ramhound Jan 17 '14 at 12:08
  • No. I don't want to find out about the type of symlink. In Linux, if I navigate to a particular directory using the symlink and then do a `pwd`; I will get the absolute path and not the path referenced by the symlink. I am looking for similar answer on Windows. I hope I am clear now. Thanks. – Coder Jan 17 '14 at 14:51

1 Answers1

1

You aren't going to get the behavior you want from that command because it isn't actually making a symlink. The command mklink /j creates what Windows calls Junctions. They are, for all intents and purposes, an analog to directory hard-links in NTFS. They also behave differently depending on how you navigate through them (explorer.exe vs. cmd.exe / powershell.exe).

Try using mklink /d as this will create a directory symbolic link and may actually provide the functionality you desire.