Linking, Renaming, and Copying Files
|relink||Like the rename program in article
the relink program (a Perl script)
relinks the symbolic links given according to the rule specified as the
The argument is a Perl expression that is expected to modify the
$_ string in Perl for at least some of the names specified.
For each symbolic link named on the command line, the Perl expression
will be executed on the contents of the symbolic link with that name.
If a given symbolic link's contents is not modified by the expression,
it will not be changed.
If a name given on the command line is not a symbolic link, it will be ignored.
If no names are given on the command line, names will be read
via standard input.
For example, to relink all symbolic links in the current directory
pointing to somewhere in X11R3 so that they point to X11R4,
you might say:
relink 's/X11R3/X11R4/' *
change all occurrences of links in the system from /usr/spool
to /var/spool, you'd say:
find / -type l -print | relink 's#^/usr/spool#/var/spool#'