<?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: MTIME Command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596343#M33424</link>
    <description>Let's say that you want all files that have been modified in the between 3 and 10 days in the past; i.e. those older than 2 days but younger than 10 days (and are regular files):&lt;BR /&gt;&lt;BR /&gt;find . -type f -mtime +2 -a -mtime -11&lt;BR /&gt;&lt;BR /&gt;Note: the -a (and) operator&lt;BR /&gt;</description>
    <pubDate>Wed, 17 Oct 2001 11:53:41 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2001-10-17T11:53:41Z</dc:date>
    <item>
      <title>MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596342#M33423</link>
      <description>Hai &lt;BR /&gt;&lt;BR /&gt;How can we display the files which are older than 3 days?? suppose today is 17th ..&lt;BR /&gt;I want to display the files from 12th to 14th..&lt;BR /&gt;&lt;BR /&gt;Is there any option in the FIND Command??? &lt;BR /&gt;&lt;BR /&gt;Can any one help me in this matter??&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rajkumar&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Oct 2001 11:40:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596342#M33423</guid>
      <dc:creator>Rajkumar_3</dc:creator>
      <dc:date>2001-10-17T11:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596343#M33424</link>
      <description>Let's say that you want all files that have been modified in the between 3 and 10 days in the past; i.e. those older than 2 days but younger than 10 days (and are regular files):&lt;BR /&gt;&lt;BR /&gt;find . -type f -mtime +2 -a -mtime -11&lt;BR /&gt;&lt;BR /&gt;Note: the -a (and) operator&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Oct 2001 11:53:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596343#M33424</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-10-17T11:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596344#M33425</link>
      <description>Hai Clay,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply..&lt;BR /&gt;&lt;BR /&gt;I have a files in a /test directory.Todays date is 18th .Suppose i want to display the files which is older than 3 days..ie.,the files show display from  14th,13th,12th.&lt;BR /&gt;&lt;BR /&gt;It should not use between those dates.......i mean there is no condition to display in between those dates..&lt;BR /&gt;&lt;BR /&gt;dd/mm/yy File_names&lt;BR /&gt;----------------------------------&lt;BR /&gt;06/Oct/01 file06.cdr&lt;BR /&gt;07/Oct/01 file07.cdr&lt;BR /&gt;08/Oct/01 file08.cdr&lt;BR /&gt;09/Oct/01 file09.cdr&lt;BR /&gt;10/Oct/01 file10.cdr&lt;BR /&gt;11/Oct/01 file11.cdr&lt;BR /&gt;12/Oct/01 file12.cdr&lt;BR /&gt;13/Oct/01 file13.cdr&lt;BR /&gt;14/Oct/01 file14.cdr&lt;BR /&gt;15/Oct/01 file15.cdr&lt;BR /&gt;16/Oct/01 file16.cdr&lt;BR /&gt;17/Oct/01 file17.cdr&lt;BR /&gt;18/Oct/01 file18.cdr&lt;BR /&gt;&lt;BR /&gt;Is it possible??&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Rajkumar</description>
      <pubDate>Thu, 18 Oct 2001 00:40:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596344#M33425</guid>
      <dc:creator>Rajkumar_3</dc:creator>
      <dc:date>2001-10-18T00:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596345#M33426</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;The 'mtime' argument to 'find' operates on a 24-hour offset based on the current day and time.  If you want more granulatory or a fixed window, create two reference files and use the '-newer' argument to 'find'.  By example:&lt;BR /&gt;&lt;BR /&gt;# touch -m -t 10120001 /tmp/ref1&lt;BR /&gt;# touch -m -t 10142359 /tmp/ref2&lt;BR /&gt;# find /tmp -type f -newer /tmp/myref1 -a ! -newer /tmp/myref2 -exec ls -l {} \;&lt;BR /&gt;&lt;BR /&gt;This will find all files in the /tmp directory modified between 10/12 at 00:01 and 10/14 at 23:59, regardless of the current date and time.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 18 Oct 2001 01:15:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596345#M33426</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-10-18T01:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596346#M33427</link>
      <description>Hai James,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply..&lt;BR /&gt;&lt;BR /&gt;Is it possible to display the files in hours based..&lt;BR /&gt;suppose if i enter the number 10 hours or 0.5 (that means 1/2 an hours) is should display the files like that along with the letter starting with "a"....&lt;BR /&gt;&lt;BR /&gt;Is it possible??&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rajkumar</description>
      <pubDate>Thu, 18 Oct 2001 01:36:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596346#M33427</guid>
      <dc:creator>Rajkumar_3</dc:creator>
      <dc:date>2001-10-18T01:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596347#M33428</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If I understand your question correctly, then "no".  The output from 'ls' shows dates and times in the format month, day-of-month and hh:mm unless the timestamp is older than 6-months.  See the man pages for 'ls'.&lt;BR /&gt;&lt;BR /&gt;BTW: It is a courtesy in this Forum to assign points to those who have helped you.  In large part, this helps subsequent readers find answers and responses that helped solve a problem.  Please see here for the official guidelines:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://us-support.external.hp.com/estaff/bin/doc.pl/forward/screen=estaffAssistance/sid=927847dd187d8d7bbc?Page=file0002#forpoints" target="_blank"&gt;http://us-support.external.hp.com/estaff/bin/doc.pl/forward/screen=estaffAssistance/sid=927847dd187d8d7bbc?Page=file0002#forpoints&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 18 Oct 2001 11:17:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596347#M33428</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-10-18T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: MTIME Command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596348#M33429</link>
      <description>Hi Rajkumar,&lt;BR /&gt;&lt;BR /&gt;I've put together a script which uses perl to give you the option of using find with a -older switch based on hours.  All other arguments are treated as find arguments.  So create the script:&lt;BR /&gt;&lt;BR /&gt;========================================&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;args=$*&lt;BR /&gt;rest=$*&lt;BR /&gt;older=0&lt;BR /&gt;file=/tmp/tempfind.$$&lt;BR /&gt;echo $args |&lt;BR /&gt; grep -q -- "-older [^ ]*" &amp;amp;&amp;amp; echo $args  |&lt;BR /&gt; sed 's/\(.*\) -older \([^ ]*\)\(.*\)/\2 \1 \3/' |&lt;BR /&gt; read older rest&lt;BR /&gt;if [ $older -gt 0 ] ; then&lt;BR /&gt; perl -e '($sec,$min,$hour,$day,$mon,$year,$rest)=(localtime(time-$ARGV[0]*3600));&lt;BR /&gt; printf ("%04d%02d%02d%02d%02d.%02d\n",&lt;BR /&gt;         $year+1900,$mon+1,$day,$hour,$min,$sec);' $older | read t&lt;BR /&gt; touch -m -t $t $file&lt;BR /&gt; rest="$rest ! -newer $file"&lt;BR /&gt;fi&lt;BR /&gt;find $rest&lt;BR /&gt;rm $file&lt;BR /&gt;======================================&lt;BR /&gt;&lt;BR /&gt;Then you can issue something like:&lt;BR /&gt;&lt;BR /&gt;./script.ksh /Database -type f -older 10.5 -mtime 8&lt;BR /&gt;&lt;BR /&gt;to list any file older than 10.5 hours, but less than 8 days.&lt;BR /&gt;&lt;BR /&gt;It's probably not foolproof, but may prove useful if you have perl loaded.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Thu, 18 Oct 2001 12:50:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mtime-command/m-p/2596348#M33429</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-10-18T12:50:51Z</dc:date>
    </item>
  </channel>
</rss>

