<?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: mv files by sorting date.. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739657#M946554</link>
    <description>Hi MW&lt;BR /&gt;&lt;BR /&gt;We get files from the Mobile switcehs ie call data record and oftern we have to do the same stuff . What i essentailly do is to build a list of the files and then use that list to move them around tape direcotries . The list is build not on find as *time sometimes get confusing what is done is that I use awk like this&lt;BR /&gt;&lt;BR /&gt;ls -l | awk '{if($6=="Jun" &amp;amp;&amp;amp; $7=="6") print $NF}' &amp;gt; June6&lt;BR /&gt;&lt;BR /&gt;This will all teh files which match the date creation to Jun6 , then I use this list to move the files around using cp or tar etc etc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
    <pubDate>Fri, 07 Jun 2002 01:34:53 GMT</pubDate>
    <dc:creator>MANOJ SRIVASTAVA</dc:creator>
    <dc:date>2002-06-07T01:34:53Z</dc:date>
    <item>
      <title>mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739650#M946547</link>
      <description>Hi all.&lt;BR /&gt;Good tips are so helpful..&lt;BR /&gt;&lt;BR /&gt;Any body helps me.. please..&lt;BR /&gt;&lt;BR /&gt;About 90000 files should be moved other directories by the date which is the files has been created..&lt;BR /&gt;&lt;BR /&gt;How can I complete it&lt;BR /&gt;Help me..thanks</description>
      <pubDate>Fri, 07 Jun 2002 00:39:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739650#M946547</guid>
      <dc:creator>mw_4</dc:creator>
      <dc:date>2002-06-07T00:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739651#M946548</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use find with the -ctime option eg. mv files 10 days ago (as dated in ls -la):&lt;BR /&gt;&lt;BR /&gt;# cd /olddir&lt;BR /&gt;# find . -ctime 10 -exec mv {} \; /newdir&lt;BR /&gt;&lt;BR /&gt;Before you run it on production, test it out first by doing this:&lt;BR /&gt;&lt;BR /&gt;# cd /olddir&lt;BR /&gt;# find . -ctime 10 -print&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 07 Jun 2002 00:49:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739651#M946548</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-06-07T00:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739652#M946549</link>
      <description>thanks steven&lt;BR /&gt;but that's not what I want.&lt;BR /&gt;files has been created about 2years ago..&lt;BR /&gt;Using ctime is not applicable..&lt;BR /&gt;can anyone help me?</description>
      <pubDate>Fri, 07 Jun 2002 01:00:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739652#M946549</guid>
      <dc:creator>mw_4</dc:creator>
      <dc:date>2002-06-07T01:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739653#M946550</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;You may encounter a problem where the 'find' command cannot process so many files using the&lt;BR /&gt;'-exec' arguement This is typical on 10.20 systems. The real answer is to change the 'large_ncargs_enabled' parameter in your kernel to the value of '1' &lt;BR /&gt;The default is 20478 bytes, (value 0) but you can increase this value to 2048000 by changing the kernel parameter. &lt;BR /&gt;You can use the command 'getconf ARG_MAX' to see.  You need to make sure that have patch PHKL_16751 installed.&lt;BR /&gt;&lt;BR /&gt;$ getconf ARG_MAX &lt;BR /&gt;20478 &lt;BR /&gt;&lt;BR /&gt;or:&lt;BR /&gt;&lt;BR /&gt;# find /filesystem -ctime 10 | xargs mv /newfilesystem&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jun 2002 01:08:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739653#M946550</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-06-07T01:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739654#M946551</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Are you looking for an exact file timestamp (e.g. exactly 2 years ago) or a range of timestamps (e.g. 1-2 years ago).&lt;BR /&gt;&lt;BR /&gt;If it is exactly two years ago, then:&lt;BR /&gt;&lt;BR /&gt;# cd /olddir&lt;BR /&gt;# find . -ctime 730 -print&lt;BR /&gt;# find . -ctime 730 -exec mv {} \; /newdir&lt;BR /&gt;&lt;BR /&gt;If it is from 2 years go to 1 year ago (period of 1 year), then:&lt;BR /&gt;&lt;BR /&gt;# cd /olddir&lt;BR /&gt;# find . -ctime -730 ! -ctime -365 -print&lt;BR /&gt;# find . -ctime -730 ! -ctime -365 -exec mv {} \; /newdir&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 07 Jun 2002 01:10:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739654#M946551</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-06-07T01:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739655#M946552</link>
      <description>exactly the time stamp day by day&lt;BR /&gt;I post some files..in my box.&lt;BR /&gt;see attached files..&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jun 2002 01:21:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739655#M946552</guid>
      <dc:creator>mw_4</dc:creator>
      <dc:date>2002-06-07T01:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739656#M946553</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How about something like this. This will move all files in year 2000 to /newdir:&lt;BR /&gt;&lt;BR /&gt;# cd /olddir&lt;BR /&gt;# ll &amp;gt; filelist&lt;BR /&gt;# for i in `cat filelist | awk '{print $9}'` ; do if ll $i | awk '{print $8}' | grep " 2000 " ; then echo $i ; mv $i /newdir ; fi ; done&lt;BR /&gt;&lt;BR /&gt;If you want to move all files dated Nov 4 2000, then&lt;BR /&gt;&lt;BR /&gt;# cd /olddir&lt;BR /&gt;# ll &amp;gt; filelist&lt;BR /&gt;# for i in `cat filelist | awk '{print $9}'` ; do if ll $i | grep " Nov  4  2000 " ; then echo $i ; mv $i /newdir ; fi ; done&lt;BR /&gt;&lt;BR /&gt;Note that there are two spaces between Nov and 4 and two spaces between 4 and 2000. Above only shows a single space due to forum display limitation.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 07 Jun 2002 01:33:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739656#M946553</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-06-07T01:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: mv files by sorting date..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739657#M946554</link>
      <description>Hi MW&lt;BR /&gt;&lt;BR /&gt;We get files from the Mobile switcehs ie call data record and oftern we have to do the same stuff . What i essentailly do is to build a list of the files and then use that list to move them around tape direcotries . The list is build not on find as *time sometimes get confusing what is done is that I use awk like this&lt;BR /&gt;&lt;BR /&gt;ls -l | awk '{if($6=="Jun" &amp;amp;&amp;amp; $7=="6") print $NF}' &amp;gt; June6&lt;BR /&gt;&lt;BR /&gt;This will all teh files which match the date creation to Jun6 , then I use this list to move the files around using cp or tar etc etc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Fri, 07 Jun 2002 01:34:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mv-files-by-sorting-date/m-p/2739657#M946554</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-06-07T01:34:53Z</dc:date>
    </item>
  </channel>
</rss>

