Created
March 11, 2018 00:58
-
-
Save albertosaurus/9f44ee60734b79f10a8fea03e1d8cedd to your computer and use it in GitHub Desktop.
List off-tree linux kernel modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
locate --null "*lib/modules/$(uname -r)*" | xargs -r0 sh -c 'for i do [ -d "$i" ] && printf "%s\n" "$i"; done' sh {} + | grep -v "^/lib/modules/$(uname -r)/kernel\|^/lib/modules/$(uname -r)$\|^/lib/modules/$(uname -r)/build$\|^/lib/modules/$(uname -r)/initrd$" | xargs ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment