Symbolic links -- absolute and relative

Symbolic links -- absolute and relative

Post by Joshua W. Burt » Mon, 28 Feb 1994 13:02:44



Has anyone a good way of converting absolute symbolic links to relative,
and vice versa?  For example, imagine that I have a symlink in
/some/random/dir, such as

foo -> ../../other/dir/foo.

What I would like is to be able to convert this to a link

foo -> /some/other/dir/foo,

or convert it back---in some way that lends itself to automation over
hundreds of links.  Assuming no simple and elegant solution already
exists, should I start writing 'abslink' and 'rellink' as zsh or perl
scripts, or is this really a job for C?

Joshua W. Burton