<?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 command for specific date and delete in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235925#M469072</link>
    <description>Hi Pate, Dennis and James. You all did an Excellent Job. Pate was write I did not try to delete the files and was in the dreams of assumptions. Find commands itself worked fine. I accept my mistake. Excellent Job. This should be rewarded to u all.. &lt;BR /&gt;&lt;BR /&gt;Thanks again for the help and will close the thread after assigning points.</description>
    <pubDate>Wed, 21 Apr 2010 10:26:11 GMT</pubDate>
    <dc:creator>Nazaf Khan</dc:creator>
    <dc:date>2010-04-21T10:26:11Z</dc:date>
    <item>
      <title>find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235916#M469063</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;There is a simple query that I want to find and delete the files older then 30 days from specific folder.Example I want to delete the files before 20 Mar anything in that folder. For that I used the commands.&lt;BR /&gt;&lt;BR /&gt;find /directory -type f -mtime +30 -exec rm {}\;&lt;BR /&gt;&lt;BR /&gt;find /data_yopkg01/gieprd -type f -name "*.*" -mtime +30 -exec rm -f {} +&lt;BR /&gt;&lt;BR /&gt;It deletes the file. But when I check in the folder there any still the files older then 30days.When I check with the command &lt;BR /&gt;&lt;BR /&gt;find /directory -type f -mtime +30 | wc -l&lt;BR /&gt;&lt;BR /&gt;That too shows the difference.&lt;BR /&gt;&lt;BR /&gt;I want to clear the folder what ever before 30 days of file. Can you help me in this please...&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2010 11:21:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235916#M469063</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-20T11:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235917#M469064</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;it can be the directories remaining after deleting. please note that rm does not delete directories.</description>
      <pubDate>Tue, 20 Apr 2010 11:34:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235917#M469064</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2010-04-20T11:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235918#M469065</link>
      <description>No that's what I got confused. There are files that exist. even if I give rm -r parameter then too there are files remaining. &lt;BR /&gt;&lt;BR /&gt;Acutally it deletes the file but only for 30 days i.e. from today if we count it only deletes the file 19th Mar 2010. But when I do ls -lrt there are files that are of 2009 and 2008 that still exists. &lt;BR /&gt;&lt;BR /&gt;I want to remove the files in this /directory which are more then 30 days older.</description>
      <pubDate>Tue, 20 Apr 2010 11:40:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235918#M469065</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-20T11:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235919#M469066</link>
      <description>Hi Zafar:&lt;BR /&gt;&lt;BR /&gt;An easy solution, is to create a reference point (file) and then delete files older than that:&lt;BR /&gt;&lt;BR /&gt;# touch -amt 03210000 /var/tmp/myref&lt;BR /&gt;# find /path -type f ! -newer /var/tmp/myref -exec rm {} +&lt;BR /&gt;&lt;BR /&gt;The "problem" with using '-mtime' or its companions, is that it works in 24-hour increments.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 20 Apr 2010 11:42:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235919#M469066</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-04-20T11:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235920#M469067</link>
      <description>Still now working.. It still shows all the files before 30 March. Although I did not use the delete option I only used find and wc to check it is right or not. With the provided command it shows 22 files. But when I check with the Mar option it shows 42 that'sthe difference.&lt;BR /&gt;&lt;BR /&gt;yficcp01$ touch -amt 03300000 /var/tmp/myref&lt;BR /&gt;yficcp01$ find /software/oracle/admin/prd206/udump -type f ! -newer /var/tmp/myref | wc -l&lt;BR /&gt;22&lt;BR /&gt;y&lt;BR /&gt;yficcp01$ pwd&lt;BR /&gt;/software/oracle/admin/prd206/udump&lt;BR /&gt;yficcp01$ ls -ltr |grep Mar|wc -l&lt;BR /&gt;42&lt;BR /&gt;yficcp01$ ls -ltr |grep Mar&lt;BR /&gt;-rw-rw----   1 oracle     dba         111258 Mar 21 01:48 prd206_ora_14347.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         121264 Mar 23 15:56 prd206_ora_4895.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          89518 Mar 23 21:33 prd206_ora_7511.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         109770 Mar 24 19:48 prd206_ora_11461.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         113164 Mar 26 14:52 prd206_ora_15122.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          99354 Mar 26 17:26 prd206_ora_29659.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          87554 Mar 27 06:29 prd206_ora_10175.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         115700 Mar 27 22:10 prd206_ora_5275.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          72254 Mar 28 10:44 prd206_ora_7137.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          84708 Mar 28 20:22 prd206_ora_28043.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         109614 Mar 28 20:35 prd206_ora_29471.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          36388 Mar 29 03:54 prd206_ora_10735.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          77608 Mar 29 04:35 prd206_ora_15657.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          34300 Mar 29 05:25 prd206_ora_20122.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         126112 Mar 29 06:29 prd206_ora_25559.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          82124 Mar 29 06:29 prd206_ora_25557.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          80558 Mar 29 16:21 prd206_ora_20281.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          81666 Mar 29 18:21 prd206_ora_2440.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          36894 Mar 29 18:43 prd206_ora_4674.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         109614 Mar 29 20:22 prd206_ora_13912.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          77034 Mar 29 20:40 prd206_ora_15972.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         122200 Mar 29 23:30 prd206_ora_2685.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         119246 Mar 30 06:50 prd206_ora_15332.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         131776 Mar 30 08:40 prd206_ora_25727.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          76564 Mar 30 08:41 prd206_ora_25803.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         122144 Mar 30 09:25 prd206_ora_29703.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          88182 Mar 30 11:18 prd206_ora_11977.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          79566 Mar 30 11:30 prd206_ora_13143.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         116636 Mar 30 17:05 prd206_ora_15479.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         115304 Mar 30 17:29 prd206_ora_17213.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         112198 Mar 30 18:26 prd206_ora_22730.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          66070 Mar 30 22:59 prd206_ora_17766.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          94264 Mar 30 23:00 prd206_ora_18287.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         103558 Mar 30 23:06 prd206_ora_18909.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         119298 Mar 31 03:15 prd206_ora_12798.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          76330 Mar 31 04:16 prd206_ora_19494.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          34692 Mar 31 04:26 prd206_ora_20195.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         120656 Mar 31 10:58 prd206_ora_29236.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          35204 Mar 31 11:46 prd206_ora_4379.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          95804 Mar 31 14:21 prd206_ora_19492.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba          81080 Mar 31 18:30 prd206_ora_13615.trc&lt;BR /&gt;-rw-rw----   1 oracle     dba         110318 Mar 31 22:40 prd206_ora_5562.trc</description>
      <pubDate>Tue, 20 Apr 2010 13:32:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235920#M469067</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-20T13:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235921#M469068</link>
      <description>&amp;gt;Still not working.&lt;BR /&gt;&lt;BR /&gt;It sure looks like it is.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;With the provided command it shows 22 files.  But when I check with the Mar option it shows 42 that's the difference.&lt;BR /&gt;&lt;BR /&gt;Those 20 files are for Mar 30 and 31, which are after the reference file.</description>
      <pubDate>Wed, 21 Apr 2010 00:33:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235921#M469068</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-04-21T00:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235922#M469069</link>
      <description>Hi Dennis, &lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. But I belive u did not get the point what my actual requirement is. I want to delete the files or director anything in this particualr folder older then the date 30th March 2010 for which I made a reference file 30th March . Now you said the files that was shown is after the reference file. But still in the March list I can see files of 20th March and older till 30th March and also 31st March too. Can u help me with the command for which I can remove all the files above the date.</description>
      <pubDate>Wed, 21 Apr 2010 08:15:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235922#M469069</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-21T08:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235923#M469070</link>
      <description>Also one more thing I can use the command rm `ls -l|grep "Mar" |awk '{print $9}'&lt;BR /&gt;&lt;BR /&gt;But here too I can delete the files of particular March month only.&lt;BR /&gt;&lt;BR /&gt;I thing we can get some clues in find command only.</description>
      <pubDate>Wed, 21 Apr 2010 08:23:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235923#M469070</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-21T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235924#M469071</link>
      <description>I'm not sure you understand your own requirements!  In your example:&lt;BR /&gt;&lt;BR /&gt;yficcp01$ touch -amt 03300000 /var/tmp/myref&lt;BR /&gt;yficcp01$ find /software/oracle/admin/prd206/udump -type f ! -newer /var/tmp/myref | wc -l&lt;BR /&gt;22&lt;BR /&gt;y&lt;BR /&gt;yficcp01$ pwd&lt;BR /&gt;/software/oracle/admin/prd206/udump&lt;BR /&gt;yficcp01$ ls -ltr |grep Mar|wc -l&lt;BR /&gt;42&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You used the find command to count the files (|wc -l) however you did not remove them.  Then you complain that the "ls -ltr |grep Mar" command is still showing them.  Why wouldn't it show them since you did not remove them?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 21 Apr 2010 08:57:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235924#M469071</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-04-21T08:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235925#M469072</link>
      <description>Hi Pate, Dennis and James. You all did an Excellent Job. Pate was write I did not try to delete the files and was in the dreams of assumptions. Find commands itself worked fine. I accept my mistake. Excellent Job. This should be rewarded to u all.. &lt;BR /&gt;&lt;BR /&gt;Thanks again for the help and will close the thread after assigning points.</description>
      <pubDate>Wed, 21 Apr 2010 10:26:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235925#M469072</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-21T10:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235926#M469073</link>
      <description>HI (again):&lt;BR /&gt;&lt;BR /&gt;I'm glad Pete straightened things out for you.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 21 Apr 2010 11:34:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235926#M469073</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-04-21T11:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235927#M469074</link>
      <description>&amp;gt;I believe you did not get the point what my actual requirement is.&lt;BR /&gt;&lt;BR /&gt;Sure I did.  You wanted to verify that the command would work so you didn't delete the files.  And when you mistakenly compared the files, you thought it worked incorrectly.&lt;BR /&gt;&lt;BR /&gt;My point was to go ahead and remove the files.&lt;BR /&gt;&lt;BR /&gt;If you want to assign more points, you can reopen the thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#41" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#41&lt;/A&gt;</description>
      <pubDate>Wed, 21 Apr 2010 17:57:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235927#M469074</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-04-21T17:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: find command for specific date and delete</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235928#M469075</link>
      <description>Hi Dennis I really apprecite all 3 of you for your all quick solution. I did reopen and had assigned pointed again. Strangly before closing the thread I did assign points to all 3 of you. Any how I had assinged more point to u all and closing the thread. &lt;BR /&gt;&lt;BR /&gt;Thanks again for the help.</description>
      <pubDate>Thu, 22 Apr 2010 14:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-for-specific-date-and-delete/m-p/5235928#M469075</guid>
      <dc:creator>Nazaf Khan</dc:creator>
      <dc:date>2010-04-22T14:27:45Z</dc:date>
    </item>
  </channel>
</rss>

