Difference between revisions of "Linux"

From SpenchWiki
Jump to: navigation, search
Line 1: Line 1:
 +
Squid:
 +
 
* squidtaild
 
* squidtaild
 
* squidclient
 
* squidclient
Line 4: Line 6:
 
* squidview
 
* squidview
 
* calamaris
 
* calamaris
 +
* sarg
 +
 +
Highlighter:
 +
 
* ccze
 
* ccze
* sarg
+
 
 +
Cleaning useless Debian items:
  
 
* localepurge
 
* localepurge
 
* deborphan
 
* deborphan
 
* debfoster
 
* debfoster
 +
 +
Monitoring:
 +
 +
* iptraf
 +
* bmon
 +
 +
WebDAV:
 +
 +
* cadaver
 +
* nd
 +
 +
== Prevent screen blanking ==
 +
 +
setterm -blank 0
  
 
== Using rsync for local file comparisons ==
 
== Using rsync for local file comparisons ==

Revision as of 22:54, 12 August 2009

Squid:

  • squidtaild
  • squidclient
  • srg
  • squidview
  • calamaris
  • sarg

Highlighter:

  • ccze

Cleaning useless Debian items:

  • localepurge
  • deborphan
  • debfoster

Monitoring:

  • iptraf
  • bmon

WebDAV:

  • cadaver
  • nd

Prevent screen blanking

setterm -blank 0

Using rsync for local file comparisons

rsync -avnhW "Desktop/My Passport/Mitsubishi090109_10" "/Volumes/My Passport"

Scripts

  • lesspipe.sh

Use in conjuction with environment variables:

export LESS=-R
export LESSOPEN="|/usr/local/bin/lesspipe.sh %s"

Script:

#!/bin/sh
case "$1" in
*.log.[0-9]*.gz) gunzip -c $1 2>/dev/null | ccze -A
        ;;
*.log|*.log.[0-9]*) cat $1 | ccze -A
        ;;
*.gz) gunzip -c $1 2>/dev/null
        ;;
esac
  • Nice terminal colours:
export PAGER='less -R -s -i'
# Blink
export LESS_TERMCAP_mb=$'\E[05;31m'
# Bold
export LESS_TERMCAP_md=$'\E[01;33m'
# End above modes
export LESS_TERMCAP_me=$'\E[0m'
# End standout
export LESS_TERMCAP_se=$'\E[0m'
# Stand out
export LESS_TERMCAP_so=$'\E[00;44;33m'
# End underline
export LESS_TERMCAP_ue=$'\E[0m'
# Underline
export LESS_TERMCAP_us=$'\E[04;32m'
  • Log file viewers:
sudo tail -F -n 50 --max-unchanged-stats=5 /var/log/apache2/access.log | ccze
sudo tail -F --max-unchanged-stats=5 -n 50 /var/log/squid/access.log | ccze -C
sudo tail -F --max-unchanged-stats=5 -n 100000 /var/log/auth.log 2> /dev/null | grep --line-buffered -E "(sshd).*(Accepted)" | ccze
sudo watch -d -t 'netstat -p -t | grep ESTABLISHED'