[TriLUG] argument list too long
Mike Norwood
norwoodm at earthlink.net
Tue Aug 5 11:56:30 EDT 2003
Thanks for all the replies. If anyone is interested I also found a link to
a Linux Journal article that talks about this limit.
http://www.linuxjournal.com/article.php?sid=6060
Mike.
On Mon, 4 Aug 2003, Scott Chilcote wrote:
> 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