[TriLUG] argument list too long
Scott Chilcote
scottchilcote at earthlink.net
Mon Aug 4 21:54:44 EDT 2003
Hi Mike,
There are a number of ways to handle this, depending on what you're
trying to do.
As mentioned, xargs is the primary solution.
You can also use echo to list the files:
echo *
And find:
find . -maxdepth 1 -exec ls -l {} \;
You can replace "ls -l" in this command line with commands that do other
things.
You can also use regular expressions to chunk up the arguments:
ls -l [A-Z]*
ls -l [a-z]*
Enjoy...
Scott C.
Mike Norwood wrote:
> Hello,
>
> I have a directory on a Redhat 7.2 machine that has over 11000 files in
> it. If I try to ls, cp, mv or rm this I get a message "Argument list too
> long". I can do what I need to do with the files in other ways, but I am
> just curious is there a way to get past this. I did some google searches,
> but can't find anything that clearly says what causes this limit and if
> there is a way to expand it.
>
> Thanks in advance.
>
> Mike Norwood
>
More information about the TriLUG
mailing list