SUMMARY: How to see real pwd instead of symbolic under ksh

From: <Shaun.Racine_at_intier.com>
Date: Mon, 28 Apr 2003 14:56:09 +0100

Thanks to following for very quick replies, all of which work;

Johan Brusche
Geoff Paul
David Smith

I will go with 'pwd -P'. I did do a man on pwd before posting, this
wasn't listed :(


Original question;
Under ksh, when I cd /usr/spool/cron and pwd I see "/usr/spool/cron",
although I am really in /var/cluster/members/{memb}/spool/cron/.

Is there a command to see the real path of a directory, without stepping
through each one in turn with ls -ld?

Background: I backed up /, /usr & /var to a new on-line disk partitions
called /exroot, /exusr & /exvar before trashing /, /usr & /var and
reinstalling Unix. When I wanted the original cron jobs I instinctively
went to /exusr/spool/cron, but found it empty because I was really in
the new, clean /var partition. I should have gone to /exvar/spool/cron,
didn't occur to me until following week (duh!).

Replies:

Johan Brusche
Try "pwd -P"

Geoff Paul
Change to csh and it will tell you your true path.

David Smith
/usr/bin/pwd
Received on Mon Apr 28 2003 - 13:58:08 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:44 NZDT