rotating a log yearly | Unix Linux Forums | Solaris

  Go Back    

Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

rotating a log yearly


Closed Thread    
Thread Tools Search this Thread Display Modes
Old 04-20-2010
lwif lwif is offline
Registered User
Join Date: Jan 2008
Last Activity: 26 June 2012, 3:46 PM EDT
Location: Ohio
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
rotating a log yearly


I am having some troubles using /usr/sbin/logadm to rotate sulog yearly. Can someone please assist with the correct syntax to rotate the sulog yearly? I'd like to maintain up to 3 years of logs.

I am on Solaris 10.

Sponsored Links
Old 04-22-2010
RTM's Avatar
RTM RTM is offline Forum Advisor  
Registered User
Join Date: Apr 2002
Last Activity: 17 October 2014, 8:46 PM EDT
Location: On my motorcycle
Posts: 3,093
Thanks: 1
Thanked 32 Times in 9 Posts
I won't know if this actually works due to the fact that our logs are changed out by a script (and by logadm - great, now I have to see if they are messing with each other)...but in reading the logadm man page, this looks like it would work to change the log every year, and keep 3 years worth...hope you have disk space!

# logadm -w /var/adm/sulog -A 3y -p 1y

(This is assuming there are no other entries for sulog in the /etc/logadm.conf already and that no one runs the logadm command to get rid of old files throughout the 3 years...or does a rm command, mv command,...etc.)

Let us know in 2013 how it worked!
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
logrotate isn't rotating files any longer manouche UNIX for Advanced & Expert Users 1 06-17-2009 05:21 PM
awk - Rotating an array 90 degrees pondlife Shell Programming and Scripting 3 02-02-2009 07:54 AM
rotating the syslogd and messages files hcclnoodles Solaris 2 10-31-2006 11:14 AM
Rotating a String bubeshj Shell Programming and Scripting 1 07-31-2006 05:07 AM

All times are GMT -4. The time now is 01:24 PM.