[linux] prikaz na vybratie datumov z logov Apacha

Matus fantomas Uhlar uhlar na fantomas.sk
Pondělí Srpen 18 09:26:05 CEST 2003


On 08.08 17:48, Oskar Stolc wrote:
> > time tr '[:' '  ' < /var/log/apache/access.log |awk '{print $4}' |sort |uniq -c
> 
> time awk -F "[\[:]" '{print $2}' access.log |uniq -c

tak sa pridam aj ja... skus pouzit prikaz cut -f4 -d' ' pomerne efektivne to
nahradi awk. 

druhe zefektivnenie je vyhodit nadbytocny cat (vsetci ste vitazi ;-)

cut -f4,5 -d' ' $log | sort | uniq -c

-- 
Matus "fantomas" Uhlar, uhlar na fantomas.sk ; http://www.fantomas.sk/
Warning: I don't wish to receive e-mail advertising to this address.
Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
(R)etry, (A)bort, (C)ancer



Další informace o konferenci linux