Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-24-2008, 05:58 AM   #1
Registered: Aug 2003
Distribution: Fedora 22, Debian 8, Centos 6/7 for servers
Posts: 101

Rep: Reputation: 16
Do you have cool MOTD?

Hey everyone - Hope this is the right place for this discussion....

I was bored the other day and thought I need to better MOTD instead of the plain old: Have some fun..... (openSuSe standard)

So I came up with the thought of having a MOTD that tells me stuff I wanted to see so I created the below script.

Do you guys have a cool / changing MOTD or something similar?

# Created by cAm34
# Save as /etc/cron.hourly/ or where ever you feel suitable

main() {

echo -e '\E[0;31m'"\033[1mLatest Logins: \033[0m"
last | head -n 3

echo -e '\E[0;31m'"\033[1mLatest SSH Failures: Total Count:\033[0m $(grep sshd /var/log/messages|  awk '/failure/' | wc -l)"
grep sshd /var/log/messages|  awk '/failure/ {print $1,$3,$9,$10,$11,$12,$13}' /var/log/messages | tail -n 3

echo -e '\E[0;31m'"\033[1mLatest 5 /var/log/messages entries: \033[0m"
tail -n 5 /var/log/messages

echo -e '\E[0;31m'"\033[1mLatest Hardware Errors: \033[0m"
dmesg | grep -i error | tail -n 3
echo -e '\E[0;31m'"\033[1mLatest DMESG Messages: \033[0m"
dmesg | tail -n 3
echo -e
echo -ne '\E[0;31m'"\033[1mUptime: \033[0m $(uptime | cut -d " " -f 5-18)"
echo -e '\E[0;34m'"\033[1m       Welcome to $(hostname) - The above info is generated every hour\033[0m"
echo -e '\E[0;34m'"\033[1m                   Have a fun stay and play nice...\033[0m"
main > /etc/motd

Last edited by cam34; 09-24-2008 at 06:03 AM.
Old 09-24-2008, 07:04 AM   #2
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 38
Not an MOTD but my .bashrc runs fortune piped to cowsay. That cow is awesome.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/motd skate Linux - Software 5 05-03-2006 08:44 AM
motd toothe Linux - Newbie 2 11-08-2005 04:02 PM
Motd wizex Slackware 6 09-05-2005 08:27 AM
motd Master Fox Linux - Software 2 08-25-2004 07:40 AM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 06:36 AM

All times are GMT -5. The time now is 09:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration