Can't exec "/bin/sh": Argument list too long

Jozef Babjak jozef.babjak at gmail.com
Wed Jun 29 13:44:05 CEST 2011


man zip:

 -@ file lists.  If a file list is specified as -@ [Not on MacOS], zip
takes  the  list  of
       input files from standard input instead of from the command
line.  For example,

              zip -@ foo

       will store the files listed one per line on stdin in foo.zip.

       Under  Unix,  this  option can be used to powerful effect in
conjunction with the find (1)
       command.  For example, to archive all the C source files in the
current directory and  its
       subdirectories:

              find . -name "*.[ch]" -print | zip source -@

       (note that the pattern must be quoted to keep the shell from
expanding it).

J.


2011/6/29 Milan Cizek <cizek.milan at seznam.cz>:
> Ahoj,
>
>> > Pravdepodobne z toho duvodu obcas dostavam chybu "Can't exec
>> "/bin/sh":
>> > Argument list too long". Lze toto nejak vyresit?
>>
>>   ^-- man xargs
>
> Pouzit xargs me napadlo, ale nejak nevim jak bych ho pouzil. Ja uz ten seznam souboru mam v jedne promenne, ziskavam je z db, takze třeba find nebo podobne pouzit nemuzu (cesty jsou ruzne). Stále se potykam s tim, ze ty soubory proste musim nějakým zpusobem predat, takze pokazde vlastne skoncim na stejne chybe.
>
> Milan
>
> --
> FreeBSD mailing list (users-l at freebsd.cz)
> http://www.freebsd.cz/listserv/listinfo/users-l
>


More information about the Users-l mailing list