Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-21-2004, 02:49 PM   #1
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?

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

Rep: Reputation: 15

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


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

All times are GMT -5. The time now is 10:06 AM.

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