Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!trantor.harris-atd.com!x102a!tcurrey From: tcurrey@x102a.harris-atd.com (currey tom 76327) Newsgroups: comp.unix.wizards Subject: Re: How do you find the symbolic links to files. Message-ID: <4901@trantor.harris-atd.com> Date: 17 Nov 90 16:17:42 GMT References: <4899@trantor.harris-atd.com> <4900@trantor.harris-atd.com> Sender: news@trantor.harris-atd.com Reply-To: tcurrey@x102a.ess.harris.com (currey tom 76327) Organization: Harris Corporation GSS, Melbourne, Florida Lines: 44 In article <4900@trantor.harris-atd.com> chuck@trantor.harris-atd.com (Chuck Musciano) writes: >In article <4899@trantor.harris-atd.com>, tcurrey@x102a.ess.harris.com (currey tom 76327) writes: >> >> How do you find the # of and locations of all links to a file? > > This is an easy one. You cannot. > > > Symbolic links are tougher. Since sym-links can span file systems and >NFS, you are not guaranteed to ever find all of them, only the ones in files >systems you have access to. You need to use find to find all symbolic links, >and then examine the link to see if it points to the file in question. This >can be tough, since some links are quite circuitous and not at all obvious. > I already explained this to my customer, I was just wonder if someone had already figured out a 'find' command or graphical list of symbolic links. I have designed for a program that would track each file in the system separately and generate a table , but I don't have time to write a program to do this now. Example: A is the object and has links B,C,D,E,F Output: A--| | |-B--| | |-C | |-D |-E |-F This only needs to usr a local mounted partition, not NFS. The program I have designed would use major overhead for the system search, but it is fairly easy to maintain a table of these links if you start creating the tables first. To let some people know about the $ cost of packages on VMS that to this is about $250,000+. This might explain better I should have said in the first place. Tom Currey