1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unix: Find: The Parameter list is too long.

Discussion in 'Programming' started by wgre0111, Aug 25, 2009.

  1. wgre0111

    wgre0111 New Member

    Joined:
    Oct 19, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    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!
     
  2. asha

    asha New Member

    Joined:
    Nov 9, 2006
    Messages:
    44
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Homemaker
    Location:
    Kolkata
    Home Page:
    Code:
    ls -1|xargs -n 1 -L % find ./% -prune -name "pkg*" -ctime +30 -exec rm -rf {} \;
    Try this!
     

Share This Page