1 |
On Sat, May 02, 2020 at 04:29:38PM +0300, Consus wrote: |
2 |
> On Sat, May 02, 2020 at 02:19:18PM +0100, Peter Humphrey wrote: |
3 |
> > Afternoon all, |
4 |
> > |
5 |
> > Is there a straightforward way of listing kernel modules that exist |
6 |
> > but haven't been loaded? |
7 |
> |
8 |
> This will do I guess: |
9 |
> |
10 |
> # lsmod | awk '{print $1}' > inserted |
11 |
> # find /lib/modules/$(uname -r) -name '*.ko' -printf '%f\n' | sed 's/\.ko$//' > present |
12 |
> # cat inserted present | sort -u |
13 |
|
14 |
Wait, no, replace the last line with: |
15 |
|
16 |
# cat inserted present | sort | uniq -u |