Checking links to libs

Chris Lingard chris at
Thu Aug 8 07:38:04 PDT 2002

Archaic wrote:

> I have a handful of binaries and a handful of libs. In the interest
> of making them fit on a floppy, I'm nixing several of the binaries.
> If I cannot use ldd to find out which libs are linked to which bins,
> is there another way? There is an, btw, that will be
> copied as well.

If you set up a bin directory, (or sbin); and a lib directory.
You can copy or just touch the file name of the binary, then

cd $TOPDIR/initrdtree/sbin

ldd * | grep lib | while read a b; do echo $a; done |  sed 's?/lib/??' 
| sort | uniq |
while read f
cp -a $LFS/lib/$f  $TOPDIR/initrdtree/lib
cp -H $LFS/lib/$f  $TOPDIR/initrdtree/lib

will populate the binaries and libraries from wherever $LFS is
pointing to.


Unsubscribe: send email to listar at
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list