# How to avoid the limit in a shell
# If command * fails, then you can

# iterate with the shell:

# (simple, completely robust and portable, may be very slow)

    for i in *; do command "$i"; done

# (works only if printf is a built-in, but then it can be much faster on high counts.)

    printf '%s\0' *|xargs -0 command

# iterate with find

# (simple, completely robust and portable, may be very slow)

    find . -exec command {} \;

# (optimizes speed, quite portable)

    find . -exec command {} +

# (optimizes speed, if find doesn't implement "-exec +" but knows "-print0")

    find . -print0|xargs -0 command

# (if there's no white space in the arguments) 

  find . -print|xargs command


# Note: find descends into directories. To avoid that portably, you can use
      "find . ! -name . -prune [...]" 

  # If the major part of the arguments consists of long, absolute or relative paths, then try start your actions from within those directories:
      cd /directory/with/long/path && command * 

  # And another quick fix may be to match fewer arguments:
      command [a-e]*; command [f-m]*; ... 

