<?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 Re: collect log files based on date in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591429#M39928</link>
    <description>Usually, on Linux one has logrotate working.&lt;BR /&gt;&lt;BR /&gt;If nothing else is defined in&lt;BR /&gt;/etc/logrotate.d/syslog&lt;BR /&gt;then the global rotation scheme as defined in&lt;BR /&gt;/etc/logrotate.conf holds which is "daily".&lt;BR /&gt;&lt;BR /&gt;Then check your crontab when the daily jobs are executed.&lt;BR /&gt;&lt;BR /&gt;# grep daily /etc/crontab &lt;BR /&gt;02 4 * * * root run-parts /etc/cron.daily&lt;BR /&gt;# ls -l /etc/cron.daily/logrotate &lt;BR /&gt;-rwxr-xr-x  1 root root 180 Jul 13  2005 /etc/cron.daily/logrotate&lt;BR /&gt;&lt;BR /&gt;So, on my sample box rotation starts daily at 04:02&lt;BR /&gt;&lt;BR /&gt;Now, depending how many rotation cycles or generations are defined in either&lt;BR /&gt;/etc/logrotate.d/syslog  or&lt;BR /&gt;/etc/logrotate.conf&lt;BR /&gt;that many days back of syslog (messages) you will have before older rolled files will be overwritten with newer ones.&lt;BR /&gt;For older logs you would have to restore them from your backups.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 26 Feb 2010 09:44:31 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2010-02-26T09:44:31Z</dc:date>
    <item>
      <title>collect log files based on date</title>
      <link>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591426#M39925</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to collect the log files based on particular date. How can i collect them.&lt;BR /&gt;Can someone help me.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 26 Feb 2010 06:39:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591426#M39925</guid>
      <dc:creator>S.S.</dc:creator>
      <dc:date>2010-02-26T06:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: collect log files based on date</title>
      <link>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591427#M39926</link>
      <description>You can try this :&lt;BR /&gt;&lt;BR /&gt;find /path_to_files -iname "*.file_extension" -mtime -period_of_time -print &lt;BR /&gt;&lt;BR /&gt;where is : &lt;BR /&gt;iname , i means , not to pay attention on big/small letters in name &lt;BR /&gt;&lt;BR /&gt;-period_of_time --period of time you are want to search &lt;BR /&gt;&lt;BR /&gt;So if you want to look for txt files changed in last 15  days and in /home directory command would be &lt;BR /&gt;&lt;BR /&gt;find /home -iname "*.txt" -mtime -15 -print &lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Feb 2010 07:30:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591427#M39926</guid>
      <dc:creator>Elko</dc:creator>
      <dc:date>2010-02-26T07:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: collect log files based on date</title>
      <link>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591428#M39927</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to do for the /var/log/messages. How can i collect log files for yesterday only.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 26 Feb 2010 08:43:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591428#M39927</guid>
      <dc:creator>S.S.</dc:creator>
      <dc:date>2010-02-26T08:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: collect log files based on date</title>
      <link>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591429#M39928</link>
      <description>Usually, on Linux one has logrotate working.&lt;BR /&gt;&lt;BR /&gt;If nothing else is defined in&lt;BR /&gt;/etc/logrotate.d/syslog&lt;BR /&gt;then the global rotation scheme as defined in&lt;BR /&gt;/etc/logrotate.conf holds which is "daily".&lt;BR /&gt;&lt;BR /&gt;Then check your crontab when the daily jobs are executed.&lt;BR /&gt;&lt;BR /&gt;# grep daily /etc/crontab &lt;BR /&gt;02 4 * * * root run-parts /etc/cron.daily&lt;BR /&gt;# ls -l /etc/cron.daily/logrotate &lt;BR /&gt;-rwxr-xr-x  1 root root 180 Jul 13  2005 /etc/cron.daily/logrotate&lt;BR /&gt;&lt;BR /&gt;So, on my sample box rotation starts daily at 04:02&lt;BR /&gt;&lt;BR /&gt;Now, depending how many rotation cycles or generations are defined in either&lt;BR /&gt;/etc/logrotate.d/syslog  or&lt;BR /&gt;/etc/logrotate.conf&lt;BR /&gt;that many days back of syslog (messages) you will have before older rolled files will be overwritten with newer ones.&lt;BR /&gt;For older logs you would have to restore them from your backups.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Feb 2010 09:44:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/collect-log-files-based-on-date/m-p/4591429#M39928</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2010-02-26T09:44:31Z</dc:date>
    </item>
  </channel>
</rss>

