[nmglug] ftp video file truncate

a a at kaluta.us
Wed Jan 13 02:42:07 PST 2010


Thanks all for the reply.I have just opened these e-mails and will
comtemplate Jasons suggestion and thank him for it.
What I am trying to do:
I have a netcam triggered by a sensor with sends the output (FTP,mjpg)
to a file in an online site for storage.I am attempting to limit the
ultimate file size by truncating or rotating the file contents. tnx

On Tue, 2010-01-12 at 12:24 -0700, Jason Schaefer wrote:
> On Tue, Jan 12, 2010 at 12:12 PM, Andrew Farnsworth
> <farnsaw at stonedoor.com> wrote:
> > On Tue Jan 12 13:46 , Jason Schaefer  sent:
> >
> > <snip>
> >>> tail -2000 logfile.txt > logfile2.txt; rm -f logfile.txt; mv
> >>> logfile2.txt logfile.
> >>
> >>I have no idea what your trying to do here. Perhaps you could explain
> >>what it is your trying to achieve?
> >
> > Looks like he is trying to manage the log file size.  He takes the log file and
> > reduces it to the last 2000 lines.
> >
> > 1) Copy last 2000 lines of logfile.txt to logfile2.txt
> > 2) delete logfile.txt
> > 3) rename (move) logfile2.txt logfile.txt
> >
> 
> sure, but I still don't understand what he was asking or trying to
> accomplish with this..
> 
> > Note that this presumes that the application that creates logfile.txt is opening
> > and closing the log file regularly rather than just opening it and leaving it open.
> >
> > Andy
> >
> _______________________________________________
> nmglug mailing list
> nmglug at nmglug.org
> https://nmglug.org/mailman/listinfo/nmglug





More information about the nmglug mailing list