Answer the question
In order to leave comments, you need to log in
Ubuntu zip 1M files?
I can’t zip a folder with 1 million files (text files 50-150kb) on ubuntu through the command line
zip -r compressed_filename.zip foldername
twists and after a few minutes writes Kill, leaving ~ 400mb file with random names and no extension
Answer the question
In order to leave comments, you need to log in
In general, thank you all. here's what happened:
I tried fs.file-max = 1000000, then sudo sysctl -p. It didn't seem to have any effect. Probably because on VPS only 500 MB of RAM
through 7zip archiving in zip broke off a little later
through 7zip archiving in 7z wrote Couldn't allocate memory
through 7zip archiving in tar threw almost everything (93%)
Googled a little and found how to transfer some of the files to other folders . Created 10 folders of 100k in each threw off using
find . -maxdepth 1 -type f |head -100000|xargs mv -t %TARGET_DIRNAME%
and made each folder an archive
Try to increase the number of maximum open files (/etc/sysctl.conf and write the following line
fs.file-max = 1000000 into it, then sudo sysctl -p). Or use another archiver: tar.gz or 7zip (installed separately from the repositories)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question