> From [EMAIL PROTECTED] Mon Jul 28 16:24:31 2003 > > > On Mon, 2003-07-28 at 17:22, Alan Connor wrote: > /var, /etc and /usr/bin, things can get sticky regarding symlinks. > > If there's a little shell script that can handle multiple symlink > redirection, I'm not smart enough to think of it... >
Well. I'd start by using find to list all the symlinks that pointed to another device find /dir -type l > file then I'd run ls -l on all of them to make a more useful list while read line ; do ls -l $line >> newfile ; done < file (yes, I know you can do both of those ops with find, but I really haven't much practice with advanced find) Now use grep to pick out the ones that point off-device then rm those with the same basic syntax as above , use sed to write new links, both from the newlist... and write the new ones with the same syntax as above. I really need some sleep right now, but this is not a hard script. Alan -- For Linux/Bash users: Eliminate spam from your life with the Mailbox-Sentry-Program. See the thread MSP on comp.mail.misc for the latest version. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]