Solusan

..:: Solusan - Otro blog más ::..

Archivo para el día 1 de April, 2008

grep

Por Solusan el 01 de April de 2008 en BSD, Debian, DragonFlyBSD, FreeBSD, Gentoo, Linux, OpenBSD, SuSE, Ubuntu

What does ‘grep’ mean?
 
The Wikipedia entry for grep states:
grep is a command line utility originally written for use with the Unix operating system.
The name comes from a command in the Unix text editor ed that takes the form:
g/re/p
This means “search globally for matches to the regular expression re, and print lines where they are found”.
Simple [...]

Seguir leyendo »

Rotacion logs apache via logrotate

Por Solusan el 01 de April de 2008 en BSD, Linux

#vi /etc/logrotate.d/apache2
/var/log/apache2/*.log { weekly missingok
rotate 52
compress
delaycompress
notifempty
create 644 root adm
sharedscripts
prerotate
su hscsp -c ‘/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=intranet.hscsp -update’
endscript
postrotate
if [ -f /usr/local/apache2/logs/httpd.pid ]; then
/etc/init.d/apachectl restart > /dev/null
fi
endscript
}
Con esta sencilla configuracion del logrotate matamos dos pajaros de un tiro:

Hacemos la rotacion del fichero de logs y dejamos la copia comprimida.
Antes de hacer la rotacion [...]

Seguir leyendo »