


SAVELOG(8)                                             SAVELOG(8)


NNAAMMEE
       savelog - cycle and truncate log files

SSYYNNOOPPSSIISS
       //uussrr//lliibb//mmaaiill//ssaavveelloogg [ --mm _m_o_d_e ] [ --uu _u_s_e_r ] [ --gg _g_r_o_u_p ]
       [ --cc _c_y_c_l_e ] [ --tt ] [ --ll ] _l_o_g_f_i_l_e

DDEESSCCRRIIPPTTIIOONN
       The _s_a_v_e_l_o_g command renames and  optionally  compresses  a
       log file and cycles it through a set of names based on the
       original log file, removing the last name in the cycle.

OOPPTTIIOONNSS
       The _s_a_v_e_l_o_g command accepts the following options:

       --mm _m_o_d_e
              Change the permissions mode for renamed  log  files
              to _m_o_d_e.  By default the mode is unchanged.

       --uu _u_s_e_r
              Change the owner for renamed log files to _u_s_e_r.  By
              default the owner is unchanged.

       --gg _g_r_o_u_p
              Change the group for renamed log  files  to  _g_r_o_u_p.
              By default the group is unchanged.

       --cc _c_y_c_l_e
              Save  _c_y_c_l_e versions of the logfile, where _c_y_c_l_e is
              a decimal number.  The default value is 7.

       --ll     Do not compress log files.  By default, a  compres-
              sion program is used, if one is available.

       --tt     Ensure  that  a new logfile exists when the savelog
              operation is complete.  Use of --mm, --uu or  --gg  imply
              this,  ensuring that the logfile will have the des-
              ignated mode.

OOPPEERRAATTIIOONN
       The given logfile is cycled through files named:

              OLD/_f_i_l_e._n_u_m_b_e_r

       where _f_i_l_e is the basename for the logfile and where  _n_u_m_-
       _b_e_r  ranges from 0 to one less then the _c_y_c_l_e count speci-
       fied for the command.  The _O_L_D  dirctory  is  created,  as
       necessary,  and is under the same directory as the logfile
       itself.

       This cycle operation is accomplished by renaming the  file
       numbered  _c_y_c_l_e-2  to  a  file  numbered _c_y_c_l_e-1 and so on
       until the file numbered 0 is renamed to the file  numbered
       1.   If compression is being used, the first cycle file is



Local                    31 January 1988                        1





SAVELOG(8)                                             SAVELOG(8)


       compressed after being renamed  to  cycle  1.   After  the
       cycle files are moved through the various names, the file-
       file itself is moved to the cycle 0 file.  This cycle nor-
       mally  occurs once every time _s_a_v_e_l_o_g is executed.  If the
       log file does not exist, savelog ignores it and  does  not
       cycle the OLD files.

       If  compression  is  being used, then compressed log files
       will have an additional suffix appropriate  for  the  com-
       pression program that is used.

SSEEEE AALLSSOO
       _s_m_a_i_l(5) and _s_m_a_i_l(8).

CCOOPPYYRRIIGGHHTT
       Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll
       Copyright(C)1992 Ronald S. Karr
       See a file COPYING, distributed with the source  code,  or
       type  _s_m_a_i_l  _-_b_c  for distribution rights and restrictions
       associated with this software.





































Local                    31 January 1988                        2


