On Sat, May 02, 2020 at 04:29:38PM +0300, Consus wrote:
> On Sat, May 02, 2020 at 02:19:18PM +0100, Peter Humphrey wrote:
> > Afternoon all,
> > 
> > Is there a straightforward way of listing kernel modules that exist
> > but haven't been loaded?
> 
> This will do I guess:
> 
>       # lsmod | awk '{print $1}' > inserted
>       # find /lib/modules/$(uname -r) -name '*.ko' -printf '%f\n' | sed 
> 's/\.ko$//' > present
>       # cat inserted present | sort -u

Wait, no, replace the last line with:

        # cat inserted present | sort | uniq -u

Reply via email to