/bin/cp: Argument list too long

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Oct 31 01:56:07 EET 2002


On 2002-10-31 01:38, Steve Stavropoulos <steve at math.upatras.gr> wrote:
> On Wed, 30 Oct 2002, Giorgos Keramidas wrote:
> > Hmmm, aporia.  Sto FreeBSD to xargs pairnei ena option -J pou mporei
> > nna xrhsimopoih8ei gia na "metakinhsei" kapoios th 8esh twn xargs
> > arguments mesa sto command.  Gia paradeigma:
> >
> > 	# cd /var/spool/mqueue
> > 	# mkdir ../oldq
> > 	# find . -type f -name '[dq]f*' | xargs -J % mv % ../oldq
> >
> > Opou to ../oldq tha einai panta to teleutaio argument sthn mv(1).
>
>  xargs -i%
>
>        --replace[=replace-str], -i[replace-str]
>               Replace occurences of replace-str  in  the  initial
>               arguments  with  names  read  from  standard input.
>               Also, unquoted blanks do not  terminate  arguments.
>               If  replace-str  is  omitted,  it  defaults to "{}"
>               (like for `find -exec').  Implies -x and -l 1.

Mallon auto einai antistoixo me to -I sto FreeBSD xargs:

     -I replstr
	     Execute utility for each input line, replacing one or
	     more occurences of replstr in up to replacements (or 5 if
	     no -R flag is specified) arguments to utility with the
	     entire line of input.  The resulting arguments, after
	     replacement is done, will not be allowed to grow beyond
	     255 bytes; this is implemented by concatenating as much
	     of the argument containing replstr as possible, to the
	     constructed arguments to utility, up to 255 bytes.  The
	     255 byte limit does not apply to arguments to utility
	     which do not contain replstr, and furthermore, no
	     replacement will be done on utility itself.  Implies -x.

> Na milhsw twra gia thn anwterwthta twn GNU tools, h na to afhsw gia
> argotera? ;-)

Tha mou arkouse na stamatouses to quest for the holly linux grail kai
na apantouses apla se auto pou rothsa xoris "ponhra sxolia" :P

Den exo tipota enantion twn GNU tools.  Apla exo sinithisei edo kai
kairo sto -J kai tha mou eleipe an den ebriska kati antistoixo.  Estw
ki an auto einai to -i tou GNU xargs.

Giorgos.



More information about the Linux-greek-users mailing list