Ubuntu: Difference between revisions
Content added Content deleted
(→Most commonly used Commands: clean kernels) |
(→Cleanup old Kernel files: figlet) |
||
Line 857: | Line 857: | ||
Modified version to remove both images & headers: |
Modified version to remove both images & headers: |
||
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge |
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge |
||
====FIGlet==== |
|||
Source: [http://www.shellhacks.com/en/Creating-ASCII-Text-Banners-from-the-Linux-Command-Line shellhacks.com] |
|||
$ sudo apt-get install figlet |
|||
figlet "Shell Hacks" |
|||
Change Fonts |
|||
figlet -f digital "Shell Hacks" |
|||
If you would prefer centered output |
|||
figlet -c "Shell Hacks" |
|||
Print a list of available FIGlet fonts : |
|||
showfigfonts |
|||
You can also download and use additional FIGlet fonts: |
|||
http://www.figlet.org/fontdb.cgi |
|||
wget http://www.figlet.org/fonts/univers.flf |
|||
figlet -f univers.flf "lol" |
|||
To display the output of a command, pipe the cmd: |
|||
date +%r | figlet -f bubble |
|||
Copy-Paste the output of this file to below file(create it if it is not present): |
|||
/etc/motd |
|||
You can alter the complete MOTD message from below files: |
|||
/etc/update-motd.d/ |
|||
<br /> |
<br /> |