1
0
mirror of https://github.com/tommytran732/Linux-Setup-Scripts synced 2024-11-22 01:21:33 -05:00

Combine ls commands

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2024-05-27 19:08:23 -07:00
parent 5475551abf
commit 2d8eb5f31d
Signed by: Tomster
GPG Key ID: 555C902A34EC968F

View File

@ -16,12 +16,7 @@
# List available modules
# shellcheck disable=SC2010
{
ls -R /lib/modules/"$(uname -r)"/kernel/drivers | grep "\.ko" | sed 's/.ko.xz//g'
ls -R /lib/modules/"$(uname -r)"/kernel/fs | grep "\.ko" | sed 's/.ko.xz//g'
ls -R /lib/modules/"$(uname -r)"/kernel/net | grep "\.ko" | sed 's/.ko.xz//g'
ls -R /lib/modules/"$(uname -r)"/kernel/sound | grep "\.ko" | sed 's/.ko.xz//g'
} > blacklist.txt
ls -R /lib/modules/"$(uname -r)"/kernel/{drivers,fs,net,sound} | grep "\.ko" | sed 's/.ko.xz//g' > blacklist.txt
# List actively used modules
lsmod | awk '{ print $1 }' > necessary.txt