bash: parameter or environment lists too long

Ouch. I was just trying to delete old log files from the application server in our software development environment…


jpwenzel # rm incomingMessages_member_10.xxx.xxx.xxx_trunk.log.2008-10-*
bash: /usr/linux/bin/rm: The parameter or environment lists are too long.

6 thoughts on “bash: parameter or environment lists too long”

  1. I was about to suggest that too. Question is, does xargs automagically limit the amount of parameters or do we need to use the option it has for that purpose?

  2. I managed to play with “find” and “xargs” — and ran into a problem with the order of the “-name” and -”print0″ options…

    If “-print0″ is used before “-name”, ALL files found are printed to stdout. Really bad if you used some kind of wildcards with -name to limit the result list…

    Grmpf. Took me 1 hour and a UNIX admin to fix it. ARGH!

Leave a Reply

Your email address will not be published. Required fields are marked *