Oct 212009
 

e.g.

 # find /var/log -type f -exec du -sm {} \; | sort -n -r | head -20 

 
41      /var/log/cabal/WorldSvr_10_01.log
35      /var/log/cabal/DBAgent_10.log
34      /var/log/cabal/WorldSvr_10_10.log
5       /var/log/maillog.4
5       /var/log/maillog.3
5       /var/log/cabal/WorldSvr_10_05.log
5       /var/log/cabal/WorldSvr_10_04.log
5       /var/log/cabal/WorldSvr_10_02.log
4       /var/log/cabal/WorldSvr_10_03.log
4       /var/log/cabal/LoginSvr_01.log
3       /var/log/maillog.2
3       /var/log/maillog.1
1       /var/log/yum.log
1       /var/log/Xorg.0.log.old
1       /var/log/Xorg.0.log
1       /var/log/wtmp.1
1       /var/log/wtmp
1       /var/log/secure.4
1       /var/log/secure.3
1       /var/log/secure.2

Sep 162009
 

Here’s how to do it

# ( cat <<HEADERS; cat /root/file.html) | sendmail -oi -t
From: sender@domain.tld
To: recipients@domain.tld
Subject: we send HTML instead of plain text
Mime-Version: 1.0
Content-type: text/html
Content-transfer-encoding: 8bit

HEADERS <- type CTRL+D then press ENTER

We should set Mime-Version , Content-Transfer-Encoding and Content-Type headers properly. The issue of correct MIME transfer encoding is one of the many possible complexities which is simply ignored here.

Continue reading »