0

UNIX pwd command is giving below: /nfs/site/disks/machine_51/main_dir/

I can go to the same directory by doing cd /p/main_dir

Is there a command or way to modify pwd so that when I run that command from main_dir, it gives me relative path (not absolute path) ?

  • This question might help you: http://stackoverflow.com/a/12498485/1525759 – Addison Aug 01 '14 at 17:53
  • 1
    Both of the paths you give `/nfs/site/disks/machine_51/main_dir/` and `/p/main_dir` are *absolute* paths, starting with a `/` — neither is a relative path. Do you mean one is a symbolic link to the other, or one is a mount point? – Stephen P Aug 01 '14 at 17:58
  • 1
    Don't actually understand what you're asking. The sole purpose of `pwd` is to display the current working directory in absolute path. If you don't need to know that, you don't need to run the command `pwd`. – Cody Aug 01 '14 at 18:02

1 Answers1

1

I was able to achieve what I wanted by doing below:

  1. In .cshrc, added set symlinks = ignore (came to know this this tcsh setting)
  2. In UNIX prompt, type cwd in place of pwd