[TriLUG] cp errror "Argument list too long"

Shane O'Donnell shaneodonnell at gmail.com
Mon Jul 25 18:54:41 EDT 2005


xargs is your friend.

Shane O.

On 7/25/05, Joel Ebel <jbebel at ncsu.edu> wrote:
> 
> There is a limit in bash (and the operating system) to the number of
> arguments you can use. Run getconf ARG_MAX to see what it is. You'll
> have to limit the number of files you're processing to that number or go
> hacking around to increase the limit, which I don't recommend.
> 
> Joel
> 
> Greg Brown wrote:
> > Ugh. I have a Axis webcam doing motion detection to watch the dogs at
> > home. I have been creating mpg movies using the following command:
> >
> > convert *.jpg -delay 10 date.mpg
> >
> > But before I use the convert command I copy the files to /tmp/date.
> >
> > When I try to copy the files I get a "Argument list too long" error
> > and nothing is copied. If I try to run the convert commany directly
> > from the directly where my Axis camera dumps them I get the same
> > error: Argument list too long.
> >
> > I got crafty and did a 'for i in *jpg; cp $i /tmp/date ; done' and
> > that worked - but the convert still failed.
> >
> > Any ideas here? I'm out of them. And google is no help, at least in
> > the middle of the night.
> >
> > *yawn*
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
> 



-- 
Shane O.
========
Shane O'Donnell
shaneodonnell at gmail.com
====================



More information about the TriLUG mailing list