1 |
On Fri, Apr 6, 2012 at 10:02 AM, András Csányi <sayusi.ando@××××××.hu> wrote: |
2 |
> Dear All, |
3 |
> |
4 |
> I'm a little bit confused regarding modprobe command. As far as I |
5 |
> remember I used the command below to list all of kernel modules |
6 |
> independently it's loaded or not. |
7 |
> modprobe -l or modprobe -L |
8 |
> |
9 |
> But now I can see that there is no -l or -L for this command. When |
10 |
> have changed this command or my memories are failed? On the other |
11 |
> hand, I would like to ask that how can I list all of kernel modules? |
12 |
> |
13 |
> Thanks in advance! |
14 |
> |
15 |
> András |
16 |
> |
17 |
> -- |
18 |
> -- Csanyi Andras (Sayusi Ando) -- http://sayusi.hu -- |
19 |
> http://facebook.com/andras.csanyi |
20 |
> -- ""Trust in God and keep your gunpowder dry!" - Cromwell |
21 |
|
22 |
From 'man modprobe' here (module-init-tools version 3.16): |
23 |
-l --list |
24 |
List all modules matching the given wildcard (or "*" if no |
25 |
wildcard is given). This option is provided for backwards |
26 |
compatibility and may go away in future: see find(1) and basename(1) |
27 |
for a more flexible alternative. |
28 |
|
29 |
|
30 |
And, found this handy little 'replacement' of sorts (in .bashrc or |
31 |
such, not tested by me): |
32 |
|
33 |
fkm() { |
34 |
local kver=$(uname -r) arg=${1//[-_]/[-_]} |
35 |
find "/lib/modules/$kver" -iname "*$arg*.ko*" \ |
36 |
-exec bash -c 'mods=("${@##*/}"); printf "%s\n" "${mods[@]%.ko*}"' _ {} + |
37 |
|
38 |
if [[ ! -e /lib/modules/$kver/kernel ]]; then |
39 |
echo "reboot!" >&2 |
40 |
fi |
41 |
} |
42 |
|
43 |
(source: https://bbs.archlinux.org/viewtopic.php?id=134393 ) |
44 |
|
45 |
-- |
46 |
Poison [BLX] |
47 |
Joshua M. Murphy |