How do you find the symbolic links to files.

currey tom 76327 tcurrey at x102a.harris-atd.com
Sun Nov 18 03:17:42 AEST 1990


In article <4900 at trantor.harris-atd.com> chuck at trantor.harris-atd.com (Chuck Musciano) writes:
>In article <4899 at trantor.harris-atd.com>, tcurrey at 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



More information about the Comp.unix.wizards mailing list