Artificial intelligent assistant

Argument list too long when zipping large list of certain files in a folder I'm trying to zip a certain large number of files by creating an array of them. Then I tried to run the zip command but met with "Argument list too long" error. declare -a arr=() fixed=5 for i in `seq 10 1 200`; do for j in `seq $((i+fixed)) 1 200`; do arr+=("${i}_${j}.xxx") done done new_arr=$(printf ",%s" "${arr[@]}") new_arr=${new_arr:1} zip all_data.zip {$new_arr}

extract from `man zip` ( linux version )


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


example from the same man page


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


So steps will be :

1. build a list off all files to be archive , format must one file name by line

2. run `zip` command

`cat BIG_FILENAME_LIST.txt | zip thebigziparchive -@`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b8f5450ebe1e42299c3a0eb159a358ba