<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic cleaning log files in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427567#M98</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to clean up log files during they are open (e.g. the access log of a web server). On HP-UX i can do that by using "cat /dev/null &amp;gt; LOGFILE". After that the LOGFILE is empty. If I do the same on Linux, the content of the file is overwritten with NULL characters and the file size remains the same as before. New entrys to the file are appended after the NULL characters.&lt;BR /&gt;Is there a way to clean up log files like on HP-UX?&lt;BR /&gt;I know that there is a solution for the apache web server but I need a solution for other software as well.&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
    <pubDate>Mon, 26 Jun 2000 11:52:32 GMT</pubDate>
    <dc:creator>Thomas CREDOZ</dc:creator>
    <dc:date>2000-06-26T11:52:32Z</dc:date>
    <item>
      <title>cleaning log files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427567#M98</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to clean up log files during they are open (e.g. the access log of a web server). On HP-UX i can do that by using "cat /dev/null &amp;gt; LOGFILE". After that the LOGFILE is empty. If I do the same on Linux, the content of the file is overwritten with NULL characters and the file size remains the same as before. New entrys to the file are appended after the NULL characters.&lt;BR /&gt;Is there a way to clean up log files like on HP-UX?&lt;BR /&gt;I know that there is a solution for the apache web server but I need a solution for other software as well.&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
      <pubDate>Mon, 26 Jun 2000 11:52:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427567#M98</guid>
      <dc:creator>Thomas CREDOZ</dc:creator>
      <dc:date>2000-06-26T11:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: cleaning log files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427568#M99</link>
      <description>Andreas,&lt;BR /&gt;&lt;BR /&gt;The problem which you are pointing to is that which happens when you truncate a file (in this case a logfile) which has open connections to it.&lt;BR /&gt;&lt;BR /&gt;If you weere to temporaily suspend the application or tell it to restart immediately after truncating the logfile, then size will be reduced.  As long as the file remains open, the original length of the file will be preserved, according to the open file handles.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jun 2000 12:41:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427568#M99</guid>
      <dc:creator>Albert E. Whale, CISSP</dc:creator>
      <dc:date>2000-06-26T12:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: cleaning log files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427569#M100</link>
      <description>Andreas,&lt;BR /&gt;&lt;BR /&gt;A solution to your problem is to issue the command "&amp;gt; LOGFILE_NAME", this will zero the log file, and start it fresh.&lt;BR /&gt;&lt;BR /&gt;e.g. "&amp;gt; /var/log/messages"&lt;BR /&gt;&lt;BR /&gt;Hope that this helps you.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 27 Jun 2000 00:07:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427569#M100</guid>
      <dc:creator>Chris Fishwick</dc:creator>
      <dc:date>2000-06-27T00:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: cleaning log files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427570#M101</link>
      <description>Did you already try:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; LOGFILE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;With Regards,&lt;BR /&gt;&lt;BR /&gt;Dieter Degrendele</description>
      <pubDate>Wed, 27 Sep 2000 08:08:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cleaning-log-files/m-p/2427570#M101</guid>
      <dc:creator>Dieter Degrendele</dc:creator>
      <dc:date>2000-09-27T08:08:20Z</dc:date>
    </item>
  </channel>
</rss>

