[nmglug] ftp video file truncate
Jason Schaefer
js at jasonschaefer.com
Tue Jan 12 11:24:52 PST 2010
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
>
More information about the nmglug
mailing list