I can do this:
$ pwd
/home/beau
$ ln -s /home/beau/foo/bar.txt /home/beau/bar.txt
$ readlink -f bar.txt
/home/beau/foo/bar.txt
But I'd like to be able to do this:
$ pwd
/home/beau
$ cd foo
$ ln -s bar.txt /home/beau/bar.txt
$ readlink -f /home/beau/bar.txt
/home/beau/foo/bar.txt
Is this possible? Can I somehow resolve the relative pathname and pass it to ln?
ln -s $(pwd)/bar.txt ~/or include an install script. – forcefsck Mar 31 '11 at 19:15