The Stack Overflow podcast is back! Listen to an interview with our new CEO.
1 of 2

There's a convenient little utility called symlinks by Mark Lords. It's no longer maintained but still available in some distributions. If yours doesn't have it, you can grab the source (e.g. from Ubuntu) and compile it.

To convert all the absolute symbolic links in a directory to be relative:

symlinks -c /path/to/directory

Unfortunately there's no option to convert a single link, you'd have to move it to its own directory first.

mkdir ../tmp
mv link-to-relativize ../tmp
symlinks ../tmp
mv ../tmp/* .
rmdir ../tmp