<?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: Remove files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157101#M726518</link>
    <description>Hi,&lt;BR /&gt;find . -type f !_newer &lt;YOUR_OLD_FILE_YOU_WANT_TO_KEEP&gt; |xarsg rm {} +&lt;BR /&gt;&lt;BR /&gt;man find for more detail about newer option.&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;&lt;/YOUR_OLD_FILE_YOU_WANT_TO_KEEP&gt;</description>
    <pubDate>Mon, 10 Mar 2008 07:27:03 GMT</pubDate>
    <dc:creator>Arturo Galbiati</dc:creator>
    <dc:date>2008-03-10T07:27:03Z</dc:date>
    <item>
      <title>Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157095#M726512</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i have 5000 files in one directory. I want to remove files except first 8 days files.&lt;BR /&gt;&lt;BR /&gt;Waiting for your response.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards</description>
      <pubDate>Fri, 07 Mar 2008 10:12:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157095#M726512</guid>
      <dc:creator>zsujith</dc:creator>
      <dc:date>2008-03-07T10:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157096#M726513</link>
      <description>&lt;!--!*#--&gt;Hi Zsujith,&lt;BR /&gt;    Try the following steps:&lt;BR /&gt;1) Create a new temporary directory say /var/new&lt;BR /&gt;#mkdir /var/new&lt;BR /&gt;2) move to the particular directory in which u want to remove the files.&lt;BR /&gt;# cd â  dirnameâ  &lt;BR /&gt;3) find the file which are 8 days old and copy to /var/new&lt;BR /&gt;#find . -xdev -type f -mtime -8  -exec cp /var/new&lt;BR /&gt;4) Delete the files in your dir&lt;BR /&gt;#rm â  rf *&lt;BR /&gt;5) Copy back your 8 days old files to your directory.&lt;BR /&gt;#cp /var/new/* .&lt;BR /&gt;&lt;BR /&gt;      Regards&lt;BR /&gt;       Davis Paul.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2008 10:52:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157096#M726513</guid>
      <dc:creator>Davis Paul</dc:creator>
      <dc:date>2008-03-07T10:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157097#M726514</link>
      <description>Well, if you truly mean just the ones newer than those created in the first 8 days, you'll want to create a reference file with a time stamp equal to your cut off date using the touch command, then use find with the -newer switch to move all the files elsewhere.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 07 Mar 2008 10:54:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157097#M726514</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-03-07T10:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157098#M726515</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;check 'man find' - there you can see the options you can use, for example:&lt;BR /&gt;'find . -type f ! -mtime -365 -exec ll {} \;'&lt;BR /&gt;'find . -type f ! -mtime -365 -exec rm {} \;'&lt;BR /&gt;(this is for files older than 1 year - it's always good to check a syntax with a 'll' at the end, so you can check if it works like you want).&lt;BR /&gt;&lt;BR /&gt;You have to decide if you want to delete files older or newer than a defined date.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Volkmar&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2008 11:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157098#M726515</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2008-03-07T11:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157099#M726516</link>
      <description>&lt;!--!*#--&gt;Sorry , my third step(exec) should finished with {} \;</description>
      <pubDate>Fri, 07 Mar 2008 11:32:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157099#M726516</guid>
      <dc:creator>Davis Paul</dc:creator>
      <dc:date>2008-03-07T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157100#M726517</link>
      <description>Hi :&lt;BR /&gt;&lt;BR /&gt;Instead of terminating the '-exec rm {}' with a semicolon, use a "+" character.  The use of the semicolon means that ONE process will be spawaned for every argument.  With the "+" character, multiple arguments will be passed to a very few (or even one) process.&lt;BR /&gt;&lt;BR /&gt;Thus:&lt;BR /&gt;&lt;BR /&gt;# find /tmp -type f -mtime +8 -exec rm {} \+&lt;BR /&gt;&lt;BR /&gt;...is far, far faster than:&lt;BR /&gt;&lt;BR /&gt;# find /tmp -type f -mtime +8 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2008 12:49:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157100#M726517</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-07T12:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Remove files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157101#M726518</link>
      <description>Hi,&lt;BR /&gt;find . -type f !_newer &lt;YOUR_OLD_FILE_YOU_WANT_TO_KEEP&gt; |xarsg rm {} +&lt;BR /&gt;&lt;BR /&gt;man find for more detail about newer option.&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;&lt;/YOUR_OLD_FILE_YOU_WANT_TO_KEEP&gt;</description>
      <pubDate>Mon, 10 Mar 2008 07:27:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-files/m-p/4157101#M726518</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2008-03-10T07:27:03Z</dc:date>
    </item>
  </channel>
</rss>

