find . -type l -exec stat {} --format=%N \; | /root/move_symlink.pl | sh
find . -type f -exec chmod 644 {} \;
find . -type f -exec chown apache:apache {} \;
move_symlink.pl
#!/usr/bin/perl
while(<>) {
/^.(.*?)' -> .(.*)'$/;
print "mv '$2' '$1'\n";
}
Tags: linux