On Mon, 7 May 2007 11:33:52 +1000
John Ferlito <[EMAIL PROTECTED]> wrote:

> On Mon, May 07, 2007 at 11:15:51AM +1000, Alan L Tyree wrote:
> > Is there some easy way to find all the symbolic links that point to
> > a given target?
> > 
> 
> No real easy way since for symbolic links there is no reverse lookup
> table in the filesystem. So you need to trawl the whole filesystem
> looking from them.
> 
> Something like
> 
> 
> find / -lname 'regex of original linked file name' -exec ls -l {} \;
> 
> 
> The tricky part here is that since links can be relative thay could
> look like any of
> ../file 
> /moo/file
> ../../l/../../file
> 
> etc so you need to cookup an appropriate regex. For all of the above
> file 
> is probably the simplest

Thanks John. I suspected as much when googling failed me.

Alan

> 
> 
> --
> John
> http://www.inodes.org/
> 


-- 
Alan L Tyree                    http://www2.austlii.edu.au/~alan
Tel: +61 2 4782 2670            Mobile: +61 427 486 206
Fax: +61 2 4782 7092            FWD: 615662
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to