<?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: Delete Files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986630#M718403</link>
    <description>Hi Raj:&lt;BR /&gt;&lt;BR /&gt;With regard to "manuals", whether or not you're new to Unix or old friends with it, the man pages are one of the greatest sources of information at your disposal.  Don't ever *not* take a minute to look.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 02 Jun 2003 17:41:41 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2003-06-02T17:41:41Z</dc:date>
    <item>
      <title>Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986611#M718384</link>
      <description>For one of my process i receive a input data file everyday (mon thru friday).&lt;BR /&gt;&lt;BR /&gt;[&lt;BR /&gt;02-June-2003 Monday , as of today i'll be having the following list of files.&lt;BR /&gt;&lt;BR /&gt;(Mon thru Friday)&lt;BR /&gt;History.dat052603&lt;BR /&gt;History.dat052703&lt;BR /&gt;History.dat052803&lt;BR /&gt;History.dat052903&lt;BR /&gt;History.dat053003&lt;BR /&gt;&lt;BR /&gt;History.dat060203   ]&lt;BR /&gt;..&lt;BR /&gt;..&lt;BR /&gt;..&lt;BR /&gt;..&lt;BR /&gt;&lt;BR /&gt;Delete Files&lt;BR /&gt;History.dat060903  &lt;BR /&gt;..&lt;BR /&gt;&lt;BR /&gt;My requirement is , on every monday i need to delete the input files those i received week before last week.&lt;BR /&gt;i.e in the above case , on 06/09/03 i need to delete files received from 05/26/03 thru 05/30/03.&lt;BR /&gt;&lt;BR /&gt;Hope i'm making myself clear.&lt;BR /&gt;&lt;BR /&gt;How to get the last modified date of particular file OR is there any simple solution for my requirement.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance.&lt;BR /&gt;Raj !!!!!!!!!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jun 2003 16:12:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986611#M718384</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-02T16:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986612#M718385</link>
      <description>If I understand the question correctly, a find command should do the trick:&lt;BR /&gt;&lt;BR /&gt;find /directory -type f -name History.dat* -mtime +5 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 02 Jun 2003 16:17:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986612#M718385</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-06-02T16:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986613#M718386</link>
      <description>You can do this with "mtime" option of find command:&lt;BR /&gt;&lt;BR /&gt;# find /dir_name -name History.dat* -type f -xdev -mtime +7 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;This will delete all files which was not modified for the last 7 days. If you want to include last accessed option too, then add -atime with find command. If you want to print a list of files which were deleted, then inlcude -exec ll {} \; with find command.</description>
      <pubDate>Mon, 02 Jun 2003 16:26:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986613#M718386</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2003-06-02T16:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986614#M718387</link>
      <description>Hi!!&lt;BR /&gt;&lt;BR /&gt;Try the following:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;find /dirname -name History.dat* -type f -mtime +5 -exec rm {} \; &lt;BR /&gt;&lt;BR /&gt;You can add this line to a cleanup/housekeeping script or create a script that contains this line and add the script to the user's crontab.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;DR</description>
      <pubDate>Mon, 02 Jun 2003 16:31:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986614#M718387</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2003-06-02T16:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986615#M718388</link>
      <description>$ find /home/dmeload/CMI -name History.dat* -type f -xdev -mtime +7 exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;when i give the above it gives me error saying,&lt;BR /&gt;"find: missing conjunction"</description>
      <pubDate>Mon, 02 Jun 2003 16:45:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986615#M718388</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-02T16:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986616#M718389</link>
      <description>For the last question:&lt;BR /&gt;&lt;BR /&gt;Put the file name - History.dat* in quotes:&lt;BR /&gt;&lt;BR /&gt;# find ..options ..-name 'History.dat*' ..options&lt;BR /&gt;&lt;BR /&gt;That will solve the issue.</description>
      <pubDate>Mon, 02 Jun 2003 16:47:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986616#M718389</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2003-06-02T16:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986617#M718390</link>
      <description>you need to enclose the 'History.dat*' in single quotes so that the shell does not expand the '*'.</description>
      <pubDate>Mon, 02 Jun 2003 16:48:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986617#M718390</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-02T16:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986618#M718391</link>
      <description>Sorry about that, Raj.  I always forget the quotes until it errors on me.  And I should have made the mtime 7 instead of 5.  But you got the idea.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 02 Jun 2003 16:50:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986618#M718391</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-06-02T16:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986619#M718392</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Using an 'find' expression with a wildcard should be quoted to prevent the shell from expanding it:&lt;BR /&gt;&lt;BR /&gt;# find /home/dmeload/CMI -name "History.dat*" -type f -xdev -mtime +7 exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF... &lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jun 2003 16:51:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986619#M718392</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-06-02T16:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986620#M718393</link>
      <description>$ find /home/dmeload/CMI -name 'History.dat*' -type f -xdev -mtime +7 exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;$ find /home/dmeload/CMI -name "History.dat*" -type f -xdev -mtime +7 exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;Both throws same error.  &lt;BR /&gt;:-(&lt;BR /&gt;&lt;BR /&gt;"find: missing conjunction"</description>
      <pubDate>Mon, 02 Jun 2003 16:58:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986620#M718393</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-02T16:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986621#M718394</link>
      <description>Again, are you using exec or -exec ? From your posts, it looks like you are using exec with minus (-) sign.</description>
      <pubDate>Mon, 02 Jun 2003 17:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986621#M718394</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2003-06-02T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986622#M718395</link>
      <description>FYI...&lt;BR /&gt;&lt;BR /&gt;$ uname -a&lt;BR /&gt;HP-UX dmeserv B.11.00 U 9000/899 1459612391 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;Is anything to do with this ?</description>
      <pubDate>Mon, 02 Jun 2003 17:02:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986622#M718395</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-02T17:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986623#M718396</link>
      <description>Raj,&lt;BR /&gt;&lt;BR /&gt;You need a minus sign in front of "exec":&lt;BR /&gt;&lt;BR /&gt;-exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 02 Jun 2003 17:04:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986623#M718396</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-06-02T17:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986624#M718397</link>
      <description>Oops.! Correction on my last post. "It look like you are using exec WITHOUT minus (-) sign." You should use - sign woth exec option.&lt;BR /&gt;&lt;BR /&gt;Also, the uname output doesn't have ny impact on your find command. What type of shell are you in?</description>
      <pubDate>Mon, 02 Jun 2003 17:04:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986624#M718397</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2003-06-02T17:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986625#M718398</link>
      <description>Nopes...&lt;BR /&gt;&lt;BR /&gt;I'm not using -exec&lt;BR /&gt;&lt;BR /&gt;This is how i'm giving,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ find /home/dmeload/CMI -name 'History.dat*' -type f -xdev -mtime +7 exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;$ find /home/dmeload/CMI -name "History.dat*" -type f -xdev -mtime +7 exec rm {} \;</description>
      <pubDate>Mon, 02 Jun 2003 17:04:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986625#M718398</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-02T17:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986626#M718399</link>
      <description>in addition to the quotes, you need -exec rather than just exec.&lt;BR /&gt;&lt;BR /&gt;A man find would tell you all of this.&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jun 2003 17:06:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986626#M718399</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-02T17:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986627#M718400</link>
      <description>You need -exec.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 02 Jun 2003 17:06:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986627#M718400</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-06-02T17:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986628#M718401</link>
      <description>Raj:&lt;BR /&gt;&lt;BR /&gt;Just add the minus (-) sign before the exec.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;DR</description>
      <pubDate>Mon, 02 Jun 2003 17:06:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986628#M718401</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2003-06-02T17:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986629#M718402</link>
      <description>Thanks all...&lt;BR /&gt;&lt;BR /&gt;-exec solved the issue.&lt;BR /&gt;&lt;BR /&gt;Clay Stephenson: I'm a new bee to unix..also i needed to solve this in quick time.. so didnt have time to look at manuals...please dont mind...&lt;BR /&gt;&lt;BR /&gt;anyways....thanks all.&lt;BR /&gt;&lt;BR /&gt;Meet you all with next query&lt;BR /&gt;;-)</description>
      <pubDate>Mon, 02 Jun 2003 17:36:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986629#M718402</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-02T17:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986630#M718403</link>
      <description>Hi Raj:&lt;BR /&gt;&lt;BR /&gt;With regard to "manuals", whether or not you're new to Unix or old friends with it, the man pages are one of the greatest sources of information at your disposal.  Don't ever *not* take a minute to look.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 02 Jun 2003 17:41:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files/m-p/2986630#M718403</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-06-02T17:41:41Z</dc:date>
    </item>
  </channel>
</rss>

