<?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: find: how to find files created from 4 to 2 days ago in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683024#M53473</link>
    <description>Gentelments !&lt;BR /&gt;I realy have over then 100000 in one directory and I want find same of them.&lt;BR /&gt;Some files was created yasterday, some week ago, some 2 weeks ago, some 2 years ago etc.&lt;BR /&gt;Now I must find files created for example from 01-01-2000 do 30-06-2000. How can I touch files when I do not know this files are, and what are named etc.&lt;BR /&gt;&lt;BR /&gt;Hello from Poland&lt;BR /&gt;KRI&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Mar 2002 13:08:02 GMT</pubDate>
    <dc:creator>KRI</dc:creator>
    <dc:date>2002-03-14T13:08:02Z</dc:date>
    <item>
      <title>find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683019#M53468</link>
      <description>Hi,&lt;BR /&gt;I want to find all files created 1,2 and 3 days ago, but not (24h * 1), (24h * 2), (24h * 3) ago from now.&lt;BR /&gt;Simply all files created yesterday, 1 day befor yesterday and 2 days before yesterday.&lt;BR /&gt;I have to use standard find (HP-UX 11.00)(not GNU)!&lt;BR /&gt;How can I use -mtime switch ?&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;========&lt;BR /&gt;&lt;BR /&gt;My files:&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 10 00:01 1file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 10 16:00 2file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 11 06:00 3file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 11 12:00 4file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 12 06:00 5file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 12 12:00 6file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 06:00 7file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 16:00 8file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 23:30 9file&lt;BR /&gt;&lt;BR /&gt;When I start find statament (find .  -mtime -3  -mtime +0 -exec ls -la {} \;) at 13:30 I will get:&lt;BR /&gt;&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 11 12:00 4file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 12 06:00 5file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 12 12:00 6file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 06:00 7file&lt;BR /&gt;&lt;BR /&gt;but I want:&lt;BR /&gt;&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 11 06:00 3file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 11 12:00 4file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 12 06:00 5file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 12 12:00 6file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 06:00 7file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 16:00 8file&lt;BR /&gt;-rw-------   1 user     user           123456 Mar 13 23:30 9file&lt;BR /&gt;&lt;BR /&gt;KRI&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 12:26:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683019#M53468</guid>
      <dc:creator>KRI</dc:creator>
      <dc:date>2002-03-14T12:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683020#M53469</link>
      <description>Hi Krzysztof,&lt;BR /&gt;&lt;BR /&gt;how about using  a reference file?&lt;BR /&gt;&lt;BR /&gt;touch time_you_want file_name&lt;BR /&gt;&lt;BR /&gt;find /path -newer file_name&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Thu, 14 Mar 2002 12:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683020#M53469</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-03-14T12:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683021#M53470</link>
      <description>Hi Peter !&lt;BR /&gt;&lt;BR /&gt;I can not use touch to change files mtime because this files are an archive and can not be changed.&lt;BR /&gt;&lt;BR /&gt;In the directory I have over than 100000 files and I must find some of them.&lt;BR /&gt;&lt;BR /&gt;KRI</description>
      <pubDate>Thu, 14 Mar 2002 12:50:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683021#M53470</guid>
      <dc:creator>KRI</dc:creator>
      <dc:date>2002-03-14T12:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683022#M53471</link>
      <description>&lt;BR /&gt;touch 0203100000 file  ( this will create file with data 10 Mar 2002 at 00:00 )&lt;BR /&gt;&lt;BR /&gt;find DIR -newer file -exec ll {} \; &amp;gt; file2&lt;BR /&gt;This will move the files newer than file in file2&lt;BR /&gt;&lt;BR /&gt;Now you have to find files listed in file2 older than yesterday &lt;BR /&gt;&lt;BR /&gt;cat file2 | grep -v 13 | grep -v 14 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ciao&lt;BR /&gt;Federico</description>
      <pubDate>Thu, 14 Mar 2002 12:51:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683022#M53471</guid>
      <dc:creator>federico_3</dc:creator>
      <dc:date>2002-03-14T12:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683023#M53472</link>
      <description>Hi Krzysztof,&lt;BR /&gt;&lt;BR /&gt;the touch- command is only used to create a reference- file! &lt;BR /&gt;&lt;BR /&gt;Look at the format in the posting of Frederico.&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Thu, 14 Mar 2002 12:58:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683023#M53472</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-03-14T12:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683024#M53473</link>
      <description>Gentelments !&lt;BR /&gt;I realy have over then 100000 in one directory and I want find same of them.&lt;BR /&gt;Some files was created yasterday, some week ago, some 2 weeks ago, some 2 years ago etc.&lt;BR /&gt;Now I must find files created for example from 01-01-2000 do 30-06-2000. How can I touch files when I do not know this files are, and what are named etc.&lt;BR /&gt;&lt;BR /&gt;Hello from Poland&lt;BR /&gt;KRI&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 13:08:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683024#M53473</guid>
      <dc:creator>KRI</dc:creator>
      <dc:date>2002-03-14T13:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683025#M53474</link>
      <description>Hi Krzysztof,&lt;BR /&gt;&lt;BR /&gt;once again, you use the file, which you create with the touch- command only as ONE time- reference- file. &lt;BR /&gt;&lt;BR /&gt;pwd &lt;BR /&gt;&lt;BR /&gt;--&amp;gt; where_ever_you_want&lt;BR /&gt;&lt;BR /&gt;touch 0203100000 file    &lt;BR /&gt;&lt;BR /&gt;the next is one command line:&lt;BR /&gt;&lt;BR /&gt;find /archive -newer /where_ever_you_want/file  -exec ll {}; #end of command   &lt;BR /&gt;&lt;BR /&gt;Of course, you can pipe this or redirect into a file and work with it, perhaps to filter something out with cut or grep commands.&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Thu, 14 Mar 2002 13:19:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683025#M53474</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-03-14T13:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683026#M53475</link>
      <description>This script answers your original question. What is does, is step back in time to 00:00:00 (the start of this day) and from that point in time finds files modified between zero (yesterday) and 2 days. So the '-M $_ &amp;gt; 0' is the upper limit (in days, with fraction, so 1.5 is one day and 12 hours), or the newest file, and the '-M _ &amp;lt;= 2' is the lower limit (the oldest file). Play with 0 and 2 to shift the limits, or add your own options to allow command line arguments.&lt;BR /&gt;&lt;BR /&gt;# pfind .&lt;BR /&gt;./3file&lt;BR /&gt;./4file&lt;BR /&gt;./5file&lt;BR /&gt;./6file&lt;BR /&gt;./7file&lt;BR /&gt;./8file&lt;BR /&gt;./9file&lt;BR /&gt;# cat pfind&lt;BR /&gt;#!/opt/perl/bin/perl&lt;BR /&gt;&lt;BR /&gt;use File::Find;&lt;BR /&gt;&lt;BR /&gt;$^T -= $^T % 86400;&lt;BR /&gt;find (sub { -M $_ &amp;gt; 0 &amp;amp;&amp;amp; -M _ &amp;lt;= 2 and print "$File::Find::name\n"; }, @ARGV);&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Mar 2002 13:23:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683026#M53475</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-03-14T13:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683027#M53476</link>
      <description>Peter !&lt;BR /&gt;Yes, now I understud !&lt;BR /&gt;I very tired ... sory.&lt;BR /&gt;But I need -older switch too :-).&lt;BR /&gt;I must find file created from A-date to B-date.&lt;BR /&gt;-newer switch is good to tell find about A-date.&lt;BR /&gt;What about B-date ?&lt;BR /&gt;&lt;BR /&gt;KRI</description>
      <pubDate>Thu, 14 Mar 2002 13:26:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683027#M53476</guid>
      <dc:creator>KRI</dc:creator>
      <dc:date>2002-03-14T13:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683028#M53477</link>
      <description>Hi Krzysztof,&lt;BR /&gt;&lt;BR /&gt;With the -newer option you get everything, from a specified time on. Therefor i mentioned, that you could now do something with the output of this command. I would direct it into a file first. (don't know how much matches you will have.) Then you simply have to make your match more precisely. For example you could do a command:&lt;BR /&gt;&lt;BR /&gt;grep -v dates_you_don't_want /rederected_file&lt;BR /&gt;&lt;BR /&gt;this would give you the output you want. Even better work would this with awk.&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter&lt;BR /&gt;&lt;BR /&gt;p.s. go to bed if possible and retry tomorrow</description>
      <pubDate>Thu, 14 Mar 2002 13:36:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683028#M53477</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-03-14T13:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683029#M53478</link>
      <description>Thanks Peter, procura and all of You !&lt;BR /&gt;1. Perl&lt;BR /&gt;I do not have /opt/perl/bin/perl&lt;BR /&gt;but /usr/contrib/bin/perl, but not run corectly.&lt;BR /&gt;pfind[3]: use:  not found&lt;BR /&gt;pfind[5]: $^T:  not found&lt;BR /&gt;pfind[5]: syntax error at line 6 : `(' unexpected&lt;BR /&gt;&lt;BR /&gt;2. Peter !&lt;BR /&gt;I have my project ready in 99% and if I'll want to change this, I must start from begin. Ohhh ! I'm in trouble now !&lt;BR /&gt;&lt;BR /&gt;KRI&lt;BR /&gt;P.S.&lt;BR /&gt;Sleep - dream :)</description>
      <pubDate>Thu, 14 Mar 2002 13:57:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683029#M53478</guid>
      <dc:creator>KRI</dc:creator>
      <dc:date>2002-03-14T13:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683030#M53479</link>
      <description>Hi Krzysztof,&lt;BR /&gt;&lt;BR /&gt;You could create 2 flag files, one for the "before" date and one for the "since" date:&lt;BR /&gt;&lt;BR /&gt;# touch 200203031000 file1&lt;BR /&gt;# touch 200203071000 file2&lt;BR /&gt;# ls -l file*&lt;BR /&gt;-rw-rw-r--   1 root       sys              0 Mar  3 10:00 file1&lt;BR /&gt;-rw-rw-r--   1 root       sys              0 Mar  7 10:00 file2&lt;BR /&gt;# find /tmp -newer file1 -a ! -newer file2 | xargs ls -l&lt;BR /&gt;-rw-rw-r--   1 wakefir    users           89 Mar  4 16:36 /tmp/60days.sh&lt;BR /&gt;-rwxr-xr-x   1 root       sys            108 Mar  6 16:27 /tmp/checkjoin&lt;BR /&gt;-rw-r--r--   1 root       sys            346 Mar  7 06:26 /tmp/dirchk.log.14484&lt;BR /&gt;-rw-r--r--   1 root       sys            346 Mar  5 06:45 /tmp/dirchk.log.170&lt;BR /&gt;-rw-r--r--   1 root       sys            346 Mar  4 06:29 /tmp/dirchk.log.26323&lt;BR /&gt;-rw-r--r--   1 root       sys            346 Mar  6 06:26 /tmp/dirchk.log.7540&lt;BR /&gt;-rwxr-xr-x   1 root       sys            260 Mar  7 09:59 /tmp/f.sh&lt;BR /&gt;-rwxr-xr-x   1 root       sys             18 Mar  5 16:12 /tmp/get_in.sh&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Thu, 14 Mar 2002 14:14:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683030#M53479</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-03-14T14:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683031#M53480</link>
      <description>You've got an ***OLD*** version of perl, shipped with HP-UX 10.20 and HP-UX 11.00 until Sep 2001&lt;BR /&gt;&lt;BR /&gt;As of Sep 2001 (application CD 5012-7954) perl-5.6.1 (the latest stable release) is available for free.&lt;BR /&gt;&lt;BR /&gt;Please install that version in order to enjoy it's power.&lt;BR /&gt;&lt;BR /&gt;You can get precompiled versions for both 10.20 and 11.00 on the HP-UX software mirrors, for exaple from here: &lt;A href="http://hpux.tn.tudelft.nl/hppd/hpux/Languages/perl-5.6.1/" target="_blank"&gt;http://hpux.tn.tudelft.nl/hppd/hpux/Languages/perl-5.6.1/&lt;/A&gt;</description>
      <pubDate>Thu, 14 Mar 2002 14:35:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683031#M53480</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-03-14T14:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: find: how to find files created from 4 to 2 days ago</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683032#M53481</link>
      <description>Thanks !&lt;BR /&gt;Simple things are superb !&lt;BR /&gt;&lt;BR /&gt;KRI</description>
      <pubDate>Thu, 14 Mar 2002 14:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-how-to-find-files-created-from-4-to-2-days-ago/m-p/2683032#M53481</guid>
      <dc:creator>KRI</dc:creator>
      <dc:date>2002-03-14T14:36:04Z</dc:date>
    </item>
  </channel>
</rss>

