Serghei Amelian wrote:
>On Monday 18 August 2003 16:31, Serghei Amelian wrote:
>
>
>>On Monday 18 August 2003 16:28, Calin Damian wrote:
>>
>>
>>>On Monday 18 August 2003 16:24, you wrote:
>>>
>>>
>>>>Cum pot sa adun doua numere in sh (sau bash)?
>>>>
>>>>
>>>man bc
>>>(optiune utila -> scale daca ai zecimale)
>>>
>>>
>>No, pur si simplu rotesc un log si trebuie sa aflu care e urmatorul numar
>>de log.
>>
>>
>
>Asta e scriptul de rotit loage, poate mai intereseaza pe cineva:
>
>#!/bin/sh
>
>if test `ls -l logging | awk {'print $5'}` -gt 5000000 ; then
> NO=`ls logging.* 2>/dev/null | awk -F . {'print $2 + 1'}`
> if test -z $NO ; then
> NO=1
> fi
> mv logging logging.$NO
> gzip logging.$NO
> touch logging
>fi
>
>
>Bineinteles ca daemonul care produce log-ul trebuie oprit inainte de face
>rotirea.
>
>
>
nu ca nu as fi circotas, dar ce e nou fata de logrotate ?
Description :
The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files. Logrotate
allows for the automatic rotation compression, removal, and mailing of
log files. Logrotate can be set to handle a log file daily, weekly,
monthly, or when the log file gets to a certain size. Normally,
logrotate runs as a daily cron job.
--
Does anyone know where I can buy 100 m of wireless lan cable?
---
Detalii despre listele noastre de mail: http://www.lug.ro/