#! /bin/bash
find . -type l | xargs ls -l | gawk '{i = NF - 2; print $i, $NF}' |
while read link file
do
	path=$(dirname $link)
	rm -f $link
	ln $path/$file $link
done
