<?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: files listing for specific time range in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6879105#M495052</link>
    <description>&lt;P&gt;Thanks Dennis,&lt;/P&gt;&lt;P&gt;Let me know the command to get modified or accessed files on 1st of July.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2016 04:58:26 GMT</pubDate>
    <dc:creator>Nilesh_Rami</dc:creator>
    <dc:date>2016-07-18T04:58:26Z</dc:date>
    <item>
      <title>files listing for specific date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6878616#M495049</link>
      <description>&lt;P&gt;How to get listing of files which has been created on specific date I.e. I want the list of files created on 1st of july 2016&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 06:40:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6878616#M495049</guid>
      <dc:creator>Nilesh_Rami</dc:creator>
      <dc:date>2016-07-15T06:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: files listing for specific date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6878816#M495050</link>
      <description>&lt;P&gt;A forum or Web search for keywords like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; find newer touch&lt;/P&gt;&lt;P&gt;should find many examples of using "touch" to create files with the&lt;BR /&gt;date-time boundries, and then "find -newer" to do the search.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; man touch&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; man find&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 16:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6878816#M495050</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2016-07-15T16:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: files listing for specific time range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6878996#M495051</link>
      <description>&lt;P&gt;&amp;gt;How to get listing of files which has been created on specific date range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: You can't get "created" only modified or accessed.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2016 04:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6878996#M495051</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2016-07-17T04:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: files listing for specific time range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6879105#M495052</link>
      <description>&lt;P&gt;Thanks Dennis,&lt;/P&gt;&lt;P&gt;Let me know the command to get modified or accessed files on 1st of July.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 04:58:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6879105#M495052</guid>
      <dc:creator>Nilesh_Rami</dc:creator>
      <dc:date>2016-07-18T04:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: files listing for specific time range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6879242#M495053</link>
      <description>&lt;P&gt;&amp;gt;Let me know the command to get modified or accessed files on 1st of July.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As Steven said, you need to search:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.hpe.com/t5/Languages-and-Scripting/Script-to-get-quot-last-month-quot/m-p/5017836" target="_blank"&gt;http://community.hpe.com/t5/Languages-and-Scripting/Script-to-get-quot-last-month-quot/m-p/5017836&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.hpe.com/t5/Languages-and-Scripting/help-newer-option-in-find/m-p/5122333" target="_blank"&gt;http://community.hpe.com/t5/Languages-and-Scripting/help-newer-option-in-find/m-p/5122333&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.hpe.com/t5/System-Administration/find-mtime-newer/m-p/4875192" target="_blank"&gt;http://community.hpe.com/t5/System-Administration/find-mtime-newer/m-p/4875192&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.hpe.com/t5/Languages-and-Scripting/delete-the-files-with-date-wise/m-p/6391751" target="_blank"&gt;http://community.hpe.com/t5/Languages-and-Scripting/delete-the-files-with-date-wise/m-p/6391751&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.hpe.com/t5/Languages-and-Scripting/script-to-move-files-by-month/m-p/3968863" target="_blank"&gt;http://community.hpe.com/t5/Languages-and-Scripting/script-to-move-files-by-month/m-p/3968863&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use "touch -a -m" to set both access and modification times.&lt;/P&gt;&lt;P&gt;If you want both accessed OR modified in a date range you need an OR:&lt;/P&gt;&lt;P&gt;find ... \( -newer start -o -newera start \) \(! -newer stop -o ! -newera stop \)&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 09:38:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6879242#M495053</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2016-07-18T09:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: files listing for specific time range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6880077#M495054</link>
      <description>&lt;P&gt;There is no single command to accomplish what you want. You must create 2 files with the timestamp range you need, in this case, July 1st. Then you construct a &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;find&lt;/STRONG&gt; &lt;/EM&gt;&lt;/FONT&gt;command that looks for files newer than the start file and older than the stop file. Here are the steps:&lt;/P&gt;&lt;PRE&gt;touch -t 07010000 /tmp/jul1_start
touch -t 07012359 /tmp/jul1_stop
find /somedir -newer /tmp/jul1_start ! -newer /tmp/jul1_stop -type f -exec ls -l {} \;&lt;/PRE&gt;&lt;P&gt;So some details:&lt;BR /&gt;&lt;BR /&gt;The &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;EM&gt;touch&lt;/EM&gt; &lt;/STRONG&gt;&lt;/FONT&gt;command will create a new file or change the timestamp of an existing file.The man page for &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;touch&lt;/STRONG&gt; &lt;/EM&gt;&lt;/FONT&gt;defines several forms of the date but the minimum form is &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;MMDDhhmm&lt;/STRONG&gt; &lt;/FONT&gt;(8 numbers). So the two reference dates are both &lt;FONT color="#0000FF"&gt;0701&lt;/FONT&gt; (July 1st). One technical note is that a file created on Jul 1st at 00:00 will *not* be found. Only Jul 1st 00:01 will be newer than &lt;FONT color="#0000FF"&gt;070000&lt;/FONT&gt;. So for an exact selection, use:&lt;/P&gt;&lt;PRE&gt;touch -t 06305959 /tmp/jul1_start&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Now, a file with a Jul 1st 00:00 timestamp will be found.&lt;BR /&gt;The second file is fine using&amp;nbsp;&lt;FONT color="#0000FF"&gt;07012359&lt;/FONT&gt; because "not newer" (the &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;! -newer&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; construct) will be true if the file is Jul 1st 23:59.&lt;/P&gt;&lt;P&gt;I put the reference files in a specific location so that temp files don't get scattered in random locations.&lt;/P&gt;&lt;P&gt;The &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;-type f&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; is important because you said the requirement is for a file and not directories or symlinks, etc. This will prevent finding both directories and files.&lt;/P&gt;&lt;P&gt;The &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;-exec&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; is used only for testing. It will run the command &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;ls -l&lt;/STRONG&gt;&lt;/EM&gt; &lt;/FONT&gt;on the results of the &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;EM&gt;find&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;. You can remove it to show just the filenames.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 04:30:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6880077#M495054</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2016-07-20T04:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: files listing for specific time range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6880212#M495055</link>
      <description>&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;Thank you very much for your reply, its really very helpful to me and really appreciate regarding your step by step guidelines which really help me to find out the solution of my issue after long time.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nilesh&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 11:37:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/files-listing-for-specific-date/m-p/6880212#M495055</guid>
      <dc:creator>Nilesh_Rami</dc:creator>
      <dc:date>2016-07-20T11:37:31Z</dc:date>
    </item>
  </channel>
</rss>

