UNIX & Linux Forums

UNIX & Linux Forums (https://www.unix.com/index.php)
-   Solaris (https://www.unix.com/solaris/)
-   -   rotating a log yearly (https://www.unix.com/solaris/134793-rotating-log-yearly.html)

lwif 04-20-2010 11:33 AM

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.


RTM 04-22-2010 12:20 PM

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! :)

All times are GMT -4. The time now is 08:13 AM.

UNIX and Linux Forums
Search Engine Optimisation provided by DragonByte SEO v2.0.32 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Unix & Linux Forums Content Copyright©1993-2017. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums