Subject: Re: Library Versions
To: None <burgessd@cwis.unomaha.edu>
From: Niklas Hallqvist <niklas@appli.se>
List: current-users
Date: 04/25/1994 07:54:46
> Is there a way to find out if 'no executable references them'?  The 
> only way I could think of was a real hard way:  delete it and see what
> crashes.

Maybe something like this:

find / \( -perm -0001 -o -perm -0010 -o -perm -0100 \) -exec ldd {} \; \
  2>/dev/null |sed -n '/=>/s/.*=> \([^ ]*\).*/\1/p' |sort |uniq >/tmp/a
find / -name "/usr/lib/lib*.so.*" -print |sort >/tmp/b
comm -13 /tmp/[ab]

If I've typed it in correctly it should (after a long while, I guess)
print out all unused shared libraries inb /usr/lib.  If you want to
see if you already miss shlibs which are referenced use "-23" instead
of "-13" in the last line.

I love U*ix tool hacking, ask a Windoze user how he'd found out which
.DLLs he didn't need!  What if it is hard to read & maintain my code,
so what?  It's still fun :-)

Hope this helps...

Niklas (who has to go to a three-and-a-half week of military service in
a couple of hours :-( )

Niklas Hallqvist	Phone: +46-(0)31-40 75 00
Applitron Datasystem	Fax:   +46-(0)31-83 39 50
Molndalsvagen 95	Email: niklas@appli.se
S-412 63  GOTEBORG, Sweden     mcsun!seunet!appli!niklas

------------------------------------------------------------------------------