User Tools

Site Tools


wiki:bash_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wiki:bash_commands [2022/11/12 12:37] – add more commands antisawiki:bash_commands [2023/08/07 10:30] (current) – add Remove old unused kernels antisa
Line 39: Line 39:
    du -s /var/lib/mysql/mydb/{table1,table2,table3}.* | awk '{ sum+=$1} END {printf sum/1024^2; print " GB"}'    du -s /var/lib/mysql/mydb/{table1,table2,table3}.* | awk '{ sum+=$1} END {printf sum/1024^2; print " GB"}'
  
 +==== Remove old unused kernels ====
 +
 +  sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'|grep -E "(image|headers|modules)" | grep -v hwe | xargs sudo apt-get -y purge
 +  
 ====== Tested on ====== ====== Tested on ======
   *    * 
wiki/bash_commands.1668253074.txt.gz · Last modified: 2022/11/12 12:37 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki