LIBCHK(1) - General Commands Manual

NAME

libchk - checks shared library links of binaries

SYNOPSIS

libchk [-hsv] [-x directory] [directory …]

DESCRIPTION

libchk is a tool to help users obtain the following information:

Directories that libchk searches for executables and libraries include:

*/bin*  
*/sbin*  
*/usr/bin*  
*/usr/games*  
*/usr/libexec*  
*/usr/sbin*  
*$LOCALBASE/bin*  
*$LOCALBASE/libexec*  
*$LOCALBASE/sbin*  
*$X11BASE/bin*  
*$X11BASE/libexec*  
*$X11BASE/sbin*

And the directories listed in PATH and the library search path that ldconfig(8) tells. In addition, a user can specify additional directories to search via the command line.

e.g.:

$ libchk /home/*/bin

The directory list is automatically optimized to avoid duplicated search.

libchk recursively looks into those directories and checks shared library links for each binary. If a dead library link is found, it is immediately reported.

When it is done though all directories, libchk lists the shared libraries in the library search path that are not referenced by (linked with) any binary.

WARNING

Do not blindly delete libraries that libchk reports as unreferenced, because there are many reasons that libchk cannot perfectly detect if a shared library is referenced by:

OPTIONS

The following command line arguments are supported:

-s

—strict

By default, libchk does not regard a reference to a library in the same directory as dead, but this option makes libchk warn of that as well.

-v

—verbose

Make a detailed report. libchk will also check and report what executables and libraries each library is referenced (used) by.

-x directory

—exclude directory

Exclude the specified directory from the list of directories that libchk searches for executables and libraries.

directory …

Additional directories to search for binaries.

ENVIRONMENT

PATH

The command search path.

LOCALBASE

The local base directory. (default: /usr/local)

X11BASE

The X11 base directory. (default: /usr/X11R6)

SEE ALSO

ldconfig(8)

BUGS

AUTHORS

Akinori MUSHA <[email protected]>

FreeBSD - September 2, 2002


Copyright (c) 2001-2011 Akinori MUSHA <akinori at musha dot org>