For example, I'm renaming many files inside a tree like this:
[bash]$ for file in `find . -name "*gsf*"`; do `mv $file ${file/gsf/msf}`; done
That renames all the instances of "gsf" in file names matching gsf to "msf", but softlinks continue to point to now-non-existent files containing "gsf".
For example, this is what happens after the rename:
lrwxrwxrwx 1 trusktr users 20 Apr 25 14:39 libmsf-1.so -> libgsf-1.so.114.0.23
lrwxrwxrwx 1 trusktr users 20 Apr 25 14:39 libmsf-1.so.114 -> libgsf-1.so.114.0.23
-rwxr-xr-x 1 trusktr users 265584 Apr 21 04:41 libmsf-1.so.114.0.23
As you can see, the soft links point to libgsf-1.so.114.0.23 which doesn't exist anymore because it was renamed to libmsf-1.so.114.0.23.
What can I do so that the rename also happens to the soft link pointers?
-execoption of file, instead of the loop. – rahmu Apr 27 '12 at 15:01