On Thursday 26 February 2004 5:43 pm, FRANCOIS Dufour wrote:
> hi to all
> my video chatt aplication have to serve image from user end to other user
> end the log file is simply growing every second is there a way to keep only
> like the 20 last request in log?
>
> thank in advance
>
>
to be run from cron:
#!/bin/bash
logfile="/var/log/somelog"
logsize=`ls -s $logfile | awk '{ print $1 }'`
date=`date -I`
if [[ ! $logsize > 200000 ]] ; then
tar czf mylog.${date}.tar.gz $logfile
rm -rf $logfile && touch $logfile
fi
>
>
> [EMAIL PROTECTED]
> administrateur http://entre-nous.qc.tc
>
> _________________________________________________________________
> MSN Search, le moteur de recherche qui pense comme vous !
> http://fr.ca.search.msn.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
+---------------------------------------------------------------+
| Nicholas Bernstein | [EMAIL PROTECTED] |
| UNIX Systems Administrator | http://www.docmagic.com |
| Document Systems Inc. | |
+---------------------------------------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]