0

I have a folder in my home directory called ~/bestphotosever

So I make a symlink as follows:

cd ~
ln -s bestphotosever bpe
cd bpe
pwd
#-- here is what pwd shows
--> /home/myuser/bpe

#What I would like it to show is the physical name
--> /home/myuser/bestphotosever

Any ideas how to do this using 'ln' command.

user603749
  • 1,638
  • 2
  • 24
  • 36

1 Answers1

2

You can use "pwd -P" instead, avoids all symlinks and prints the "real" path

edit: I just realized i might not have answered your question.

Are you sure "you want" a hardlink? Some info on hard link vs symlink. https://askubuntu.com/questions/210741/why-are-hard-links-not-allowed-for-directories

If you just want to get into the folder with a shorter name, either tabcompletion or aliases are your friends.

Community
  • 1
  • 1
Froziph
  • 463
  • 2
  • 9
  • pwd -P does the job with softlink but have to remember to use. Didn't test to see if there is shell prompt option that could help. The other option is to make .sh and use that. was trying to avoid that. – user603749 Sep 27 '15 at 02:01