LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-21-2004, 03:49 PM   #1
ptp
LQ Newbie
 
Registered: Oct 2003
Distribution: SuSE 9.1
Posts: 10

Rep: Reputation: 0
logrotate with date in filename


Okay, this really is a newbie question...

I want to rotate my logs (using Slackware 9.1 distro, logrotate script) and have the archived logs with the date in the extension. Is this possible? I saw another post that seemed to do something like this, but didn't understand it. If I use the directive

extension $(date %D)

in the global variables of logrotate.conf, will this accomplish what I'm wanting to do?

ptp
 
Old 04-14-2011, 11:55 AM   #2
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Rep: Reputation: 15
dateext

Take a look at the dateext option in logrotate. See here for more information:

http://www.thegeekstuff.com/2010/07/logrotate-examples/
 
  


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 do I add the current date to a filename? sammysrefuge Linux - Newbie 2 03-18-2005 03:43 PM
adding date timestamp to filename markraem Solaris / OpenSolaris 2 11-17-2004 09:32 AM
Script add date to filename amphion Linux - Newbie 2 06-02-2004 08:12 AM
use date as output filename? wijnands Linux - Newbie 1 05-12-2004 04:39 PM
how to add date to filename x2000koh Programming 1 07-08-2003 10:44 PM


All times are GMT -5. The time now is 06:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration