summarylogtreecommitdiffstats
path: root/boot-kernel-list
blob: a86fdb7d6807f73cdd814c7b950087cf884cf6b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
# Simona Pisano - 2018-11-18 -
# simona-scripts
# Libertamente utilizzabile sotto GPL v3

  #alias sget-kernel-list='
  search=`uname -r`; printf "Kernels /boot :\n";
  for file in /boot/vmlinuz* ; do
  info=`file $file`; file="${file:6:99}"; ver=${info#*version}; ver=${ver%\(*}; [[ $ver =~ $search ]] && flag="<-used" || flag="";
  printf "%-28s %s %24s %s\n" "$file" "->" "$ver" "$flag";
  done;
  #'