1832106 Members
3149 Online
110038 Solutions
New Discussion

Re: Rotating logs

 
Peter Remirez
Occasional Advisor

Rotating logs

Hi,

I have a large file i.e. >=2GB and would like to transfer it over the WAN. I have tried splitting(using split) such file into smaller equal sized chunks and transferring these separate chunks over the WAN, and reassembling them later.

However, may I know how I could "rotate the log" for such files to effectively transfer it over the WAN?

Besides rotating the log, are there better ways/tools for transferring huge files, NOT only filesystems?

Thanks
2 REPLIES 2
Ollie R
Respected Contributor

Re: Rotating logs

Hi,

To rotate the logs, it would depend on which process is writing to it - you'll possibly have to stop and start the process to allow the log switch. Which process are you referring to?

Large files can be zipped using "gzip" which generally gives a very good compression ratio with text.

Ollie.
To err is human but to not award points is unforgivable
Alexander M. Ermes
Honored Contributor

Re: Rotating logs

Hi there.
What you can do :

create a file with no bytes ( named test1 or so )
touch test

copy the original file to file named filename_YYMMDD
copy syslog syslog_030710

copy the file test to syslog
copy test syslog

zip syslog_030710
gzip syslog_030710

If you put something like this in a script, you can take the systemdate to rename or copy your originalfile.

Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"