Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   Unix: Find: The Parameter list is too long. (http://www.go4expert.com/forums/unix-parameter-list-long-t19169/)

wgre0111 25Aug2009 21:38

Unix: 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!

asha 26Aug2009 10:44

Re: Unix: Find: The Parameter list is too long.
 
Code:

ls -1|xargs -n 1 -L % find ./% -prune -name "pkg*" -ctime +30 -exec rm -rf {} \;
Try this!


All times are GMT +5.5. The time now is 15:16.