=head1 NAME

kldfind - find kernel modules by string

=head1 SYNOPSIS

 kldfind [-qv] -c category ...
 kldfind [-qv] -s string   ...
 kldfind  -h


=head1 DESCRIPTION

To find kernel modules more easily, the script accept these arguments:


=head1 OPTIONS

B<-h> display a short help text

B<-c> use to find kld by category

B<-s> match strings for all kld's

B<-v> increase verbose display, with short description and sumary for all modules' directories

B<-q> quiet; does not write anything to standard output, return 0 if any match befound
but strings for all kld's

=head1 EXAMPLES

All occurrents for acpi category using the default output (short)

 kldfind -c acpi

 /boot/kernel/acpi_asus.ko
 /boot/kernel/acpi_fujitsu.ko
 /boot/kernel/acpi_ibm.ko
 /boot/kernel/acpi_panasonic.ko
 /boot/kernel/acpi_sony.ko
 /boot/kernel/acpi_toshiba.ko
 /boot/kernel/acpi_video.ko
 /boot/kernel/acpi_dock.ko

Now using verbose output:

 kldfind -vc acpi

 ====>   Search finished, 8 resultes for /boot/kernel

       KLD                      Description
       ---                      -----------

 ===>  acpi_asus,           --- Asus Laptop Extras 
 ===>  acpi_fujitsu,        --- Fujitsu Laptop Extras 
 ===>  acpi_ibm,            --- ACPI extras driver for IBM laptops 
 ===>  acpi_panasonic,      --- ACPI hotkey driver for Panasonic laptops 
 ===>  acpi_sony,           --- ACPI notebook controller driver for Sony laptops 
 ===>  acpi_toshiba,        --- Toshiba HCI interface 
 ===>  acpi_video,          --- ACPI Video Extensions driver 
 ===>  acpi_dock,           --- No manual entry for acpi_dock


Parse all output by any matching string using the default output (short)

 kldfind -s es137x

 /boot/kernel/snd_es137x.ko

 Now, using verbose output:

 kldfind -vs es137x

 ====> Search finished, 1 resultes for /boot/kernel


       KLD                      Description
       ---                      -----------

 ===>  snd_es137x,          --- Ensoniq AudioPCI ES137x bridge device drive


 Is possible to use kldfind in your script without shell redirect, using quiet output

 if kldfind -qs unknown;then echo YES;else echo NO;fi 
NO

 if kldfind -qs geom_gate;then echo YES;else echo NO;fi  
YES

=head1 EXIT STATUS

kldfind returns  a  zero  exit  status if it succeeds, a non-zero value is
returned in case of failure.

=head1 AUTHOR

Ricardo A. Reis <ricardo.areis@gmail.com>

=head1 SEE ALSO

kldstat(8),kldload(8),kldconfig(8)


syntax highlighted by Code2HTML, v. 0.9.1