10 Topics

Member Avatar for
Member Avatar for ashleytauari

#!/bin/bash LOGFILE=/var/log/backup.log backup_source="/home" backup_dest="/home/sean" date=`date '+%d-%B-%Y'` hostname=$(hostname -s) filename="$hostname-$date.tgz" echo "Backing Up your Linux System" tar cvpzf $backup_dest/$filename $backup_source LOGFILE="log-$date.log" log(){ message="$@" echo $message echo $message >>$LOGFILE } log "$LOGFILE" log | tee install.log echo "Backup finished" echo "$LOGFILE" hie I'm trying append teh files i have backed up into …

Member Avatar for CGSMCMLXXV
0
182
Member Avatar for iamthesgt

In working on a logfile for an application, I needed to limit the size of the logfile to 1000 bytes. Since it is not possible to delete lines from a file in C++, I used the following steps: Rename the logfile to a temporary name. Read the temporary file. Write …

Member Avatar for iamthesgt
0
223
Member Avatar for aamitrhce

Hi All, Need to Analyze Zimbra Mail server sync.log through shell script Required output from sync.log Total Number of Users : Total Number of Device ID: Total Number of Device Type with Version : Below is Sample of Log File : 2009-12-16 00:00:43,970 INFO [btpool0-12194://webmail.amit.com/Microsoft-Server-ActiveSync?Cmd=Ping&User=rahul%40kke.amit.com&DeviceId=androidc986729649&DeviceType=Android] [] sync - POST Microsoft-Server-ActiveSync?Cmd=Ping&User=ritesh%40kke.amit.com&DeviceId=androidc986729649&DeviceType=Android …

Member Avatar for L7Sqr
0
335
Member Avatar for iamthesgt

In writing a logfile program, I need a function to output the log entries between two dates. I use [ICODE]seekg()[/ICODE] and [ICODE]tellg()[/ICODE] to save the position of the first entry to output and last entry and then go back later to output the data in between. However, [ICODE]seekg()[/ICODE] when told …

Member Avatar for iamthesgt
0
261
Member Avatar for iamthesgt

In writing a logger for an application, the datestamp ends up adding a new line. The datestamp function is as follows: [CODE]string log_class::get_time() { time_t rawtime; time (&rawtime); string timestamp; timestamp = (ctime (&rawtime)); return timestamp; } [/CODE] This outputs something like [ICODE]Tue Sep 6 14:58:35 2011[/ICODE], but when called …

Member Avatar for NathanOliver
0
747
Member Avatar for garyrickert

I have multiple servers running Centos 5.5 or later, some of them have syslogs with date stamps like: Sep 1 05:12:36 and some of them like: 2011-09-04T09:21:42.442689-07:00. I would really like to get them all the same so the same analysis scripts can be used, but I have not been …

Member Avatar for garyrickert
0
902
Member Avatar for neoraghav

Hi, I want to create a log file that captures all the actions happening...anyway i got code for that from internet. Now what i want to do is, make that [COLOR="Red"][U][B]file read only[/B][/U][/COLOR] so that the data is not modified by external application or user. [code=c++]log(char* msg) { time_t now …

Member Avatar for neoraghav
0
2K
Member Avatar for Isaaac

So I've got some lines in my richtextbox, but when i click btnSaveLog, it saves, but everything is on one line... I have to use a richtextbox to show all info. I've seen it does show the lines with Wordpad, but i'm saving it as a *.log file, so i'm …

Member Avatar for Isaaac
0
821
Member Avatar for ebohhhhh

Hi- My brother gave me his old laptop, but it's really slow. I got a Hijack This report to see what could be slowing it down but I don't know much about computers. Can anyone take a look at this and help me out? ---- Logfile of Trend Micro HijackThis …

0
146
Member Avatar for InsightsDigital

Back even a few years ago, it was popular to use log files to ascertain web analytics. Now, most companies use a javascript tag that the web analytic tool picks up. Hence, do you still rely on logfiles? Or do you forget it even exists?

0
73

The End.