<?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: Housekeeping of old files on HP-UX in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719430#M252437</link>
    <description>Hi Devender,&lt;BR /&gt;&lt;BR /&gt;Sorry for misleading, i mean there exist 5 types of files with similar file name.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#find . -name "RevokeRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;#find . -name "UploadRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, only one of the folders have this pattern.Other folder contain different name with .zip format&lt;BR /&gt;&lt;BR /&gt;Actually, I am planning to set a cronjob at night for this to avoid system performance.&lt;BR /&gt;&lt;BR /&gt;Attached please find the some reuslt of ll in one of my folder.</description>
    <pubDate>Sat, 28 Jan 2006 02:52:29 GMT</pubDate>
    <dc:creator>ccchung</dc:creator>
    <dc:date>2006-01-28T02:52:29Z</dc:date>
    <item>
      <title>Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719426#M252433</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I need to remove files with mtime over 4 months inside a folder which contain over 40000 files in it.&lt;BR /&gt;&lt;BR /&gt;This folder also contain 3 subfolders which also have over 30000 files.&lt;BR /&gt;&lt;BR /&gt;Before I delete it, I have to provide the list of file to be delete and I use the following command in each folder to list out the name of file &lt;BR /&gt;&lt;BR /&gt;find . -type f -mtime +120 -exec ls -l {} &amp;gt;&amp;gt; result \;&lt;BR /&gt;&lt;BR /&gt;However, it is still running after 30 mins and not completed. It make the whole system response very slow and I have to stop it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please kindly help to provide some faster and better solution for my case ? Many Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chung</description>
      <pubDate>Sat, 28 Jan 2006 01:24:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719426#M252433</guid>
      <dc:creator>ccchung</dc:creator>
      <dc:date>2006-01-28T01:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719427#M252434</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can do the same job in bunches by specifying the file names with wild characters. Something like&lt;BR /&gt;&lt;BR /&gt;#find . -name "*.dbf" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;Like this it will list only the files with the names matching.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender</description>
      <pubDate>Sat, 28 Jan 2006 01:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719427#M252434</guid>
      <dc:creator>Devender Khatana</dc:creator>
      <dc:date>2006-01-28T01:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719428#M252435</link>
      <description>Hi Devender,&lt;BR /&gt;&lt;BR /&gt;Thanks for the suggestion.There are only 5 types of files I can found in those folder.&lt;BR /&gt; &lt;BR /&gt;But is it possible to limit the total number of output file when i run the command ?&lt;BR /&gt;&lt;BR /&gt;Since my server is running slow and it have impact to the system performance if i delete all of them in same time , I can only set a cronjob to delete some old files  ( say 2000 files ) every day, any idea ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#find . -name "*.dbf" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chung</description>
      <pubDate>Sat, 28 Jan 2006 02:14:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719428#M252435</guid>
      <dc:creator>ccchung</dc:creator>
      <dc:date>2006-01-28T02:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719429#M252436</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What does this do&lt;BR /&gt;#find . -name "*.dbf" -mtime +120 -exec ll {} \; |pg&lt;BR /&gt;&lt;BR /&gt;Will it not limit the output to be only one page at a time. ALlthough if the server is so heavily loaded you could search for some off time (night) to do this sort of jobs.&lt;BR /&gt;&lt;BR /&gt;Also as the you have only 5 types of files are the nsames as well same for those files ? Instead of extentions you could also try various starting names like&lt;BR /&gt;&lt;BR /&gt;"a*.*"&lt;BR /&gt;"b*.*"&lt;BR /&gt;&lt;BR /&gt;Can you attach the output of ll in that directory?&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender</description>
      <pubDate>Sat, 28 Jan 2006 02:24:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719429#M252436</guid>
      <dc:creator>Devender Khatana</dc:creator>
      <dc:date>2006-01-28T02:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719430#M252437</link>
      <description>Hi Devender,&lt;BR /&gt;&lt;BR /&gt;Sorry for misleading, i mean there exist 5 types of files with similar file name.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#find . -name "RevokeRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;#find . -name "UploadRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, only one of the folders have this pattern.Other folder contain different name with .zip format&lt;BR /&gt;&lt;BR /&gt;Actually, I am planning to set a cronjob at night for this to avoid system performance.&lt;BR /&gt;&lt;BR /&gt;Attached please find the some reuslt of ll in one of my folder.</description>
      <pubDate>Sat, 28 Jan 2006 02:52:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719430#M252437</guid>
      <dc:creator>ccchung</dc:creator>
      <dc:date>2006-01-28T02:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719431#M252438</link>
      <description>Hi Devender,&lt;BR /&gt;&lt;BR /&gt;Sorry for misleading, i mean there exist 5 types of files with similar file name.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#find . -name "RevokeRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;#find . -name "UploadRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, only one of the folders have this pattern.Other folder contain different name with .zip format&lt;BR /&gt;&lt;BR /&gt;Actually, I am planning to set a cronjob at night for this to avoid system performance.&lt;BR /&gt;&lt;BR /&gt;Attached please find the some reuslt of ll in one of my folder. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;chung</description>
      <pubDate>Sat, 28 Jan 2006 02:55:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719431#M252438</guid>
      <dc:creator>ccchung</dc:creator>
      <dc:date>2006-01-28T02:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719432#M252439</link>
      <description>Hi Devender,&lt;BR /&gt;&lt;BR /&gt;Sorry for misleading, i mean there exist 5 types of files with similar file name.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#find . -name "RevokeRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;#find . -name "UploadRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, only one of the folders have this pattern.Other folder contain different name with .zip format&lt;BR /&gt;&lt;BR /&gt;Actually, I am planning to set a cronjob at night for this to avoid system performance.&lt;BR /&gt;&lt;BR /&gt;Please find the below redult of ll in one of my folder. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;some output of ll &lt;BR /&gt;&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall    2576 Aug  9 21:12 ./RevokeRequest.2115603712460820.49695480.0809130351000.74&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall    2584 Aug  9 21:22 ./RevokeRequest.2115643440906802.98036990.0809131104000.74&lt;BR /&gt;&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall    2598 Aug  9 21:22 ./UploadRequest.2115628945393296.21170640.0809131153000.74&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall    2573 Aug  9 21:42 ./UploadRequest.2115550562241390.44837920.0809133312000.74&lt;BR /&gt;&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     216 Aug 16 07:17 ./ReportWork.null.711601.1124147857917.8&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     215 Aug 16 07:17 ./ReportWork.null.711602.1124147857918.8&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     216 Aug 16 07:17 ./ReportWork.null.711600.1124147857916.8&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     215 Aug 16 07:17 ./ReportWork.null.711599.1124147857912.4&lt;BR /&gt;&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     216 Aug 16 07:17 ./Schedule.null.711601.1124147857917.8&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     215 Aug 16 07:17 ./Schedule.null.711602.1124147857918.8&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     216 Aug 16 07:17 ./Schedule.null.711600.1124147857916.8&lt;BR /&gt;-rw-rw-r--   1 oracle    oinstall     215 Aug 16 07:17 ./Schedule.null.711599.1124147857912.4&lt;BR /&gt;Thanks,&lt;BR /&gt;chung</description>
      <pubDate>Sat, 28 Jan 2006 03:08:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719432#M252439</guid>
      <dc:creator>ccchung</dc:creator>
      <dc:date>2006-01-28T03:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719433#M252440</link>
      <description>Hi Devender,&lt;BR /&gt;&lt;BR /&gt;Sorry for misleading, i mean there exist 5 types of files with similar file name.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#find . -name "RevokeRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;#find . -name "UploadRequest*" -mtime +120 -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, only one of the folders have this pattern.Other folder contain different name with .zip format&lt;BR /&gt;&lt;BR /&gt;Actually, I am planning to set a cronjob at night for this to avoid system performance.&lt;BR /&gt;&lt;BR /&gt;Attached please find the result of ll in one of my folder. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;chung</description>
      <pubDate>Sat, 28 Jan 2006 03:09:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719433#M252440</guid>
      <dc:creator>ccchung</dc:creator>
      <dc:date>2006-01-28T03:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719434#M252441</link>
      <description>Hi,&lt;BR /&gt;You could still differentiate these file as there is a number in file names which is different for all files. A complete listing would have given a better idea. Still you can do something like this&lt;BR /&gt;&lt;BR /&gt;#find . -name "RevokeRequest.21156*" -mtime +120 -exec ll {} \;|wc -l&lt;BR /&gt;&lt;BR /&gt;Note :wc -l to count the files listed.&lt;BR /&gt;&lt;BR /&gt;#find . -name "UploadRequest..21155*" -mtime +120 -exec ll {} \;|wc -l&lt;BR /&gt;&lt;BR /&gt;Also there are other files as well.&lt;BR /&gt;You can do this by cron but I do not suggest that as the process may consume all the resources due to some eventuality and could even cause a crash of application etc.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender</description>
      <pubDate>Sat, 28 Jan 2006 03:44:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719434#M252441</guid>
      <dc:creator>Devender Khatana</dc:creator>
      <dc:date>2006-01-28T03:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719435#M252442</link>
      <description>Hi Chung:&lt;BR /&gt;&lt;BR /&gt;You can greatly reduce the time your cleanup takes!&lt;BR /&gt;&lt;BR /&gt;When you use '-exec' with 'find' you are spawning a new process for every file that is delivered to you!  Process initiation, like birth, is a very, very intensive action.&lt;BR /&gt;&lt;BR /&gt;The key to reducing the amount of work to do is to initiate one process to handle groups (or blocks) of data at a time.  This is exactly what 'xargs' is designed to do.&lt;BR /&gt;&lt;BR /&gt;# find . -xdev -type f -mtime +120 | xargs ls -l results.log1&lt;BR /&gt;&lt;BR /&gt;Now, when you want to actually remove the files *and* would also like a trace of what was actually done, do:&lt;BR /&gt;&lt;BR /&gt;# find . -xdev -type f -mtime +120 | xargs -t rm 2&amp;gt; results.log2&lt;BR /&gt;&lt;BR /&gt;Note that the '-t' option to 'xargs' enables a trace of every command executed to be written to STDERR.  Hence, note the redirection of file descriptor-2 to the log file.&lt;BR /&gt;&lt;BR /&gt;Using 'xargs' instead of '-exec' will dramatically reduce your execution times!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 28 Jan 2006 10:03:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719435#M252442</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-01-28T10:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719436#M252443</link>
      <description>You can further reduce the time (after xargs use) by limiting the search to alphabetical splits. Remove files from a-d first and then so on and so forth.&lt;BR /&gt;&lt;BR /&gt;find /dir -name "[aA-dD]*" -exec ll -d {} \; |xargs -t rm 2&amp;gt;&amp;gt;/dir/remove.log</description>
      <pubDate>Sat, 28 Jan 2006 10:20:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719436#M252443</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-01-28T10:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719437#M252444</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Removing files in groups (e.g. [A-F], [G-K] etc.) as opposed to in one pass will not gain anything.&lt;BR /&gt;&lt;BR /&gt;By breaking one 'find' into several, you will end up walking the same trees, and 'stat'ing the *same* files multiple times before they are ultimately removed.&lt;BR /&gt;&lt;BR /&gt;The use of 'xargs' in lieu of '-exec' will result in your user's thanking you.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 28 Jan 2006 10:56:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719437#M252444</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-01-28T10:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719438#M252445</link>
      <description>well, yeah, something like that _can_ take a long time. as long as it gets done, i don't have a problem with it in general.&lt;BR /&gt;now, what your problem is seems to be that the process slows down your system. just let it run, but renice it to begin with. it might even take longer to complete, but at least it will not interfere (much) with the rest of your system.&lt;BR /&gt;&lt;BR /&gt;nice &lt;VALUE&gt; &lt;CMD&gt;&lt;/CMD&gt;&lt;/VALUE&gt;</description>
      <pubDate>Mon, 30 Jan 2006 08:13:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719438#M252445</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2006-01-30T08:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Housekeeping of old files on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719439#M252446</link>
      <description>So you would:&lt;BR /&gt;* Optimize the find by using xargs instead of -exec&lt;BR /&gt;   and&lt;BR /&gt;* Be nicer to the CPU with the "nice" command&lt;BR /&gt;&lt;BR /&gt;A comment to Dirk's "nice" command.&lt;BR /&gt;&lt;BR /&gt;For the command to really be nice to the system you would want to use a positive value!!!&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;nice 10 "command"&lt;BR /&gt;&lt;BR /&gt;If you additionally put it to run in background it will be even slightly nicer.&lt;BR /&gt;&lt;BR /&gt;nice 10 "command" &amp;amp;&lt;BR /&gt;&lt;BR /&gt;An unsigned value increases the system nice value causing it to run at lower priority.&lt;BR /&gt;&lt;BR /&gt;A negative value (less nice)=higher priority&lt;BR /&gt;&lt;BR /&gt;Positive value = nicer :-))&lt;BR /&gt;because it get lower priority.&lt;BR /&gt;&lt;BR /&gt;/2r</description>
      <pubDate>Mon, 30 Jan 2006 15:03:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-of-old-files-on-hp-ux/m-p/3719439#M252446</guid>
      <dc:creator>Tor-Arne Nostdal</dc:creator>
      <dc:date>2006-01-30T15:03:50Z</dc:date>
    </item>
  </channel>
</rss>

