GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KLDFIND(8) FreeBSD System Manager's Manual KLDFIND(8)

kldfind - find kernel modules by string

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

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

-h display a short help text

-c use to find kld by category

-s match strings for all kld's

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

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

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

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

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

kldstat(8),kldload(8),kldconfig(8)
9 November 2007 9 November 2007

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.