Unix: Find: The Parameter list is too long.

wgre0111's Avatar, Join Date: Oct 2008
Light Poster
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's Avatar, Join Date: Nov 2006
Go4Expert Member
ls -1|xargs -n 1 -L % find ./% -prune -name "pkg*" -ctime +30 -exec rm -rf {} \;
Try this!