LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2014, 11:34 PM   #1
azheruddin
Member
 
Registered: Dec 2011
Posts: 91
Blog Entries: 1

Rep: Reputation: Disabled
Log archiving


Hi,

wanted to archive the logs/files older than one month or older than 30 days to some particular location.

File/log format is like below

ABCD_EF_GHIJ_Defaulter_Report_(06-Jun-2014_11-50-20_AM)

Source : /test/ABC
Destinatio : /test/archive

Falovour is Redhat 6.1
 
Old 06-30-2014, 12:09 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Do you wish to do it manually or using a script? Have to done anything so far?
Check utilities like logrotate and also this tutorial.
 
Old 06-30-2014, 01:37 AM   #3
azheruddin
Member
 
Registered: Dec 2011
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
wanted to do it through Script and wanted to add this job in cron.
 
Old 06-30-2014, 02:10 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by azheruddin View Post
wanted to do it through Script and wanted to add this job in cron.
Hi Azher,

It would be great if you can share what have you tried so far and where you are stuck.
 
Old 06-30-2014, 08:07 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by azheruddin View Post
wanted to do it through Script and wanted to add this job in cron.
Are you saying you don't want to use logrotate? You can invoke it from a script and run the job in cron.

As Vikas027 is saying, perhaps a bit more elaboration on what exactly you're trying to do and what you have tried thus far will get you some more helpful answers. I know that myself and many others on the forum know a ton about logrotate.
 
  


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
How to automate archiving of log files using tar? profi81 Linux - Newbie 2 03-29-2011 06:39 PM
[SOLVED] archiving log files chandkur Linux - Newbie 28 03-01-2011 02:06 PM
Log file and command output archiving software harry edwards Linux - Server 2 11-01-2008 06:28 PM
archiving rotated log files tjainsworth Linux - Security 4 07-12-2006 01:00 PM
Webserver Log Rotation, Stats and Archiving. graq Linux - Enterprise 1 02-24-2006 06:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:56 AM.

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