LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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: 83
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: 83
Blog Entries: 1

Original Poster
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,300

Rep: Reputation: 102Reputation: 102
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: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,617
Blog Entries: 12

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration