If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > PLEASE HELP: Find: The Parameter list is too long.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-25-09, 12:06
wgre0111 wgre0111 is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
PLEASE HELP: Find: The Parameter list is too long.

find ./* -prune -name "pkg*" -ctime +30 -exec rm -rf {} \;

ksh: /usr/bin/find: 0403-027 The parameter list is too long.


List grew too long and now i need help finding a alternative way to accomplish this task.. It deletes all of the pkg files that are greater then 30 days. PLEASE HELP. Would be nice to just be able to modifiy slightly to accomplish same thing. Or maybe assistance with breaking this down into batches of files at once. Please advise. thanks! dbforums have never let me down before!
Reply With Quote
  #2 (permalink)  
Old 08-26-09, 10:37
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,448
I think that should be
Code:
find . -prune -name "pkg*" -ctime +30 -exec rm -rf {} \;
Reply With Quote
  #3 (permalink)  
Old 08-27-09, 09:16
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I would also put the {} into double-quotes to prevent problems with spaces in file/path names.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On