Really cool but obscure command line

I found this site and just love it. It lists out a lot of obscure commands that can be used on Unix systems, like ledger, a terminal based accounting package! What?!? Check it out!

A little collection of cool unix terminal/console/curses tools Just a list of 20 (now 28) tools for the command line. Some are little-known, some are just too useful to miss, some are pure obscure — I hope you find something useful that you weren’t aware of yet! Use your operating system’s package manager to install most of them.

Logwatch on Ubuntu

What is logwatch?

It is an awesome monitoring tool. I have it running on one of my servers. Every night I get a status report on the behavior of my server.

Logwatch benefits:

  • Perform daily log analysis every night on a host machine
  • Can be configured to email reports to admin users
  • System Administrator Usage
    • Easy setup
    • Monitor host machines for all access and usage stats
    • Alert suspicious usage or access attempts
    • Email reports in an organized and easy to read format

Simple Install

Just run the following command:
sudo apt-get install logwatch


Look into the configuration file and edit the settings to reflect the email account you want reports to be sent. By default it uses local mail. Look into the email options section to get logwatch to email external accounts like Gmail.
vim /usr/share/logwatch/default.conf/logwatch.conf
Output = mail
Format = html

Email Options (For Gmail, etc.)

Either setup a mail server like postfix or utilize another agent to send out logs via email.
Here is a great tutorial explaining an alternative to a mail server using sendmail.

Run the Reports Daily

To have logwatch run daily, set the command to the crontab.
crontab -e

The format for a cron job is:
(minute) (hour) (day of the month) (month) (day of the week) command

A * stands for every.

Here is an example of a crontab entry to run logwatch daily:

0 0 * * * logwatch


Below are just some screenshots of the reports I receive from the tool. The reports are outdated and I no longer use the machine they detail… just in case you were curious.