LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 11-21-2006, 06:55 AM   #1
linuxN3w8ie
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
removing logs older than 30 days


Hello,

Im new to linux and i have a slight problem, i have logs that i dont need and there's lots of them i was wondering if there is a way to remove all of them in one go where the logs are older than 30 days. Any suggestions would be appreciated.

Thanks in advance
 
Old 11-21-2006, 06:58 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
well generally you'd look into logrotate, but as you've given us no information whatosever about what these logs are we can't really help much more can we?
 
Old 11-21-2006, 09:08 AM   #3
linuxN3w8ie
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Well i'm using an oracle product called collaboration suite on linux, and it archives the logs, i dont need the logs that are older than 30 days as a backup was taken and anything older than 30 days is not necessary.
 
Old 11-21-2006, 01:27 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
well fair enough, no idea what the logging structure would be there, but as above, check out logrotate. you will already have it running on your system, and it'd be trivial to ask it to rotate another log file.
 
  


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
Bash script to remove files older than 3 days rust8y Linux - General 26 10-04-2012 08:26 AM
New kernels - removing older ones ?? bigjohn Ubuntu 18 12-10-2006 05:24 PM
How to move files older than 30 days gfem AIX 8 11-08-2006 04:58 AM
delete files older than 30 days using cronjob latheesan Linux - Newbie 5 06-14-2005 02:40 PM
delete files in server that is older than 30 days using cronjob latheesan *BSD 2 06-14-2005 12:37 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration