Ignore:
Timestamp:
03/19/2020 10:00:16 AM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
e68b588
Parents:
09f0998
Message:

Format sysutils

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22859 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/logrotate.xml

    r09f0998 rb1532549  
    3131
    3232    <para>
    33       The <application>logrotate</application> package allows automatic rotation,
    34       compression, removal, and mailing of log files.
     33      The <application>logrotate</application> package allows automatic
     34      rotation, compression, removal, and mailing of log files.
    3535    </para>
    3636
     
    119119
    120120  <sect2 role="configuration">
    121      <title>Configuring Logrotate</title>
    122 
    123      <para><application>Logrotate</application> needs a configuration file,
    124      which must be passed as an argument to the command when executed.  Create
    125      the file as the <systemitem class="username">root</systemitem> user:</para>
     121    <title>Configuring Logrotate</title>
     122
     123    <para>
     124      <application>Logrotate</application> needs a configuration file,
     125      which must be passed as an argument to the command when executed.  Create
     126      the file as the <systemitem class="username">root</systemitem> user:
     127    </para>
    126128
    127129<screen role="root"><userinput>cat &gt; /etc/logrotate.conf &lt;&lt; EOF
     
    170172chmod -v 0644 /etc/logrotate.conf</userinput></screen>
    171173
    172     <para>Now create the <filename class='directory'>/etc/logrotate.d</filename>
    173     directory as the  <systemitem class="username">root</systemitem> user:</para>
     174    <para>
     175      Now create the <filename class='directory'>/etc/logrotate.d</filename>
     176      directory as the  <systemitem class="username">root</systemitem> user:
     177    </para>
    174178
    175179<screen role="root"><userinput>mkdir -p /etc/logrotate.d</userinput></screen>
    176180
    177   <para>At this point additional log rotation commands can be entered, typically
    178   in the <filename class='directory'>/etc/logrotate.d</filename> directory.
    179   For example:</para>
     181    <para>
     182      At this point additional log rotation commands can be entered, typically
     183      in the <filename class='directory'>/etc/logrotate.d</filename> directory.
     184      For example:
     185    </para>
    180186
    181187<screen role="nodump"><userinput>cat &gt; /etc/logrotate.d/sys.log &lt;&lt; EOF
     
    193199chmod -v 0644 /etc/logrotate.d/sys.log</userinput></screen>
    194200
    195   <para>You can designate multiple files in one entry:</para>
     201    <para>
     202      You can designate multiple files in one entry:
     203    </para>
    196204
    197205<screen role="nodump"><userinput>cat &gt; /etc/logrotate.d/example.log &lt;&lt; EOF
     
    208216chmod -v 0644 /etc/logrotate.d/example.log</userinput></screen>
    209217
    210   <para>You can use in the same line the list of files: file1 file2 file3.
    211   See the logrotate man page or
    212   <ulink url='http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/'/>
    213   for more examples.</para>
    214 
    215   <para>The command <command>logrotate /etc/logrotate.conf</command> can be
    216   run manually, however, the command should be run daily.
    217   Other useful commands are <command>logrotate -d /etc/logrotate.conf</command>
    218   for debugging purposes and <command>logrotate -f /etc/logrotate.conf</command>
    219   forcing the logrotate commands to be run immediately. Combining the previous
    220   options <option>-df</option>, you can debug the effect of the force command.
    221   When debugging, the command is only simulated, not really run, thus, eventual
    222   non-existing errors appear, when some intermediate files are expected,
    223   because they are not actually created.</para>
     218    <para>
     219      You can use in the same line the list of files: file1 file2 file3.
     220      See the logrotate man page or <ulink
     221      url='http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/'/>
     222      for more examples.
     223    </para>
     224
     225    <para>
     226      The command <command>logrotate /etc/logrotate.conf</command> can be
     227      run manually, however, the command should be run daily.
     228      Other useful commands are <command>logrotate -d
     229      /etc/logrotate.conf</command> for debugging purposes and
     230      <command>logrotate -f /etc/logrotate.conf</command> forcing the
     231      logrotate commands to be run immediately. Combining the previous options
     232      <option>-df</option>, you can debug the effect of the force command.
     233      When debugging, the command is only simulated, not really run, thus,
     234      eventual non-existing errors appear, when some intermediate files are
     235      expected, because they are not actually created.
     236    </para>
    224237
    225238    <para>
Note: See TracChangeset for help on using the changeset viewer.