Gentoo Archives: gentoo-user

From: Joshua Murphy <poisonbl@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] list of kernel modules
Date: Fri, 06 Apr 2012 14:45:17
In Reply to: [gentoo-user] list of kernel modules by "András Csányi"
On Fri, Apr 6, 2012 at 10:02 AM, András Csányi <sayusi.ando@××××××.hu> wrote:
> Dear All, > > I'm a little bit confused regarding modprobe command. As far as I > remember I used the command below to list all of kernel modules > independently it's loaded or not. > modprobe -l or modprobe -L > > But now I can see that there is no -l or -L for this command. When > have changed this command or my memories are failed? On the other > hand, I would like to ask that how can I list all of kernel modules? > > Thanks in advance! > > András > > -- > --  Csanyi Andras (Sayusi Ando)  -- -- > > --  ""Trust in God and keep your gunpowder dry!" - Cromwell
From 'man modprobe' here (module-init-tools version 3.16): -l --list List all modules matching the given wildcard (or "*" if no wildcard is given). This option is provided for backwards compatibility and may go away in future: see find(1) and basename(1) for a more flexible alternative. And, found this handy little 'replacement' of sorts (in .bashrc or such, not tested by me): fkm() { local kver=$(uname -r) arg=${1//[-_]/[-_]} find "/lib/modules/$kver" -iname "*$arg*.ko*" \ -exec bash -c 'mods=("${@##*/}"); printf "%s\n" "${mods[@]%.ko*}"' _ {} + if [[ ! -e /lib/modules/$kver/kernel ]]; then echo "reboot!" >&2 fi } (source: ) -- Poison [BLX] Joshua M. Murphy


Subject Author
Re: [gentoo-user] list of kernel modules "András Csányi" <sayusi.ando@××××××.hu>