[TriLUG] cp errror "Argument list too long"
William Sutton
william at trilug.org
Mon Jul 25 23:10:53 EDT 2005
Maybe it's time to switch to Perl :)
#-----
my @file = map { chomp($_); $_; } `ls -1rt /path/to/files`;
foreach my $file (@files)
{
next unless -f "/path/to/files/$file";
`cp /path/to/file/$file /tmp/date`;
# your convert code here
# and, if you want, uncomment the next line
# unlink ("/path/to/files/$file");
}
#-----
On Mon, 25 Jul 2005, 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
>
>
More information about the TriLUG
mailing list