LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-11-2014, 02:50 PM   #1
Billy_6052
LQ Newbie
 
Registered: Dec 2014
Posts: 14

Rep: Reputation: Disabled
Back up logs file and create a script showing the backed up logs and the running logs


Hi
Hope I'm through to the right section.

I want to create a bash script that pulls logs from a back up file so I would be able to compare the running logs against the backed up logs to see if a "bad" guy has messed around with the system. The logs I want to use are /var/log/messages and /var/log/boot.log. Is this possible?

If not I just want to create a good script serving good use to a security admin
 
Old 12-11-2014, 06:05 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Everything is "possible", even windows may one day turn into a good OS, ( nah! )
But first post what you have already tried no one here is going to write the script for you, second if you are just starting out with shell scripting grab a copy of the advanced bash scripting guide ( abs ), it covers the basic's right upto advanced stuff.
 
1 members found this post helpful.
Old 12-11-2014, 10:41 PM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Tell us what have you tried so far, we can try suggesting the fix if there are issues but we cant serve cooked recipes.
 
1 members found this post helpful.
Old 12-12-2014, 10:42 AM   #4
Billy_6052
LQ Newbie
 
Registered: Dec 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
right what I want to do now is log any errors in the var/log/messages, the command I am using is

logrobot /var/log/messages 60 'error' 'panic' -show 5 10

logrobot command is not there, is there any command similar to this?
 
Old 12-12-2014, 12:40 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Billy_6052 View Post
right what I want to do now is log any errors in the var/log/messages, the command I am using is

logrobot /var/log/messages 60 'error' 'panic' -show 5 10

logrobot command is not there, is there any command similar to this?
Maybe install it? http://www.logrobot.com/
 
Old 12-13-2014, 02:32 AM   #6
Billy_6052
LQ Newbie
 
Registered: Dec 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Maybe install it? http://www.logrobot.com/
I know you can install it, I just wanted to know if there is a command similar to it where I dont have to install it
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Audit logs to send logs to syslog-ng (remote server) Iyyappan Linux - Server 5 01-07-2014 04:15 PM
logs are not generating inside sftp logs, while acitive directory users are loggin in deepak_message Linux - Server 6 03-24-2013 11:37 AM
Question about the logs viewer application (/var/logs) balteo Linux - General 1 11-20-2009 11:13 PM
Finding LDAP Server Logs / Application Logs in Linux arbignay Linux - Newbie 2 03-24-2008 09:54 AM
Ubuntu logs on, then logs back off generallee5686 Ubuntu 0 10-20-2005 01:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration