3

On one of our servers, we have a directory with the following path:

"/daten/i/scripts"

When you go to /daten/i, one can see that scripts is a soft link to "/batch".

When I type cd /daten/i/scripts and then pwd, I see /daten/i/scripts.

Is there a way, a command, that I can type in at /daten/i/scripts that shows me that I'm in a "soft link", that I am really in /batch?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Wolfgang Adamec
  • 1,353
  • 4
  • 12
  • 14

1 Answers1

3

Yes, pwd has -P (--physical) option to avoid all symlinks.

So do:

pwd -P

or you can use the canonical way, readlink:

readlink -f /path

Check man pwd and man readlink.

heemayl
  • 54,820
  • 8
  • 124
  • 141