S
S
SoloMidPlzD2016-08-23 22:01:17
ubuntu
SoloMidPlzD, 2016-08-23 22:01:17

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

4 answer(s)
S
SoloMidPlzD, 2016-08-24
@SoloMidPlzD

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

S
Saboteur, 2016-08-24
@saboteur_kiev

tar + gzip instead of zip

V
Vadim Yakovlev, 2016-08-23
@1nn0

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)

Y
Yuri Chudnovsky, 2016-08-23
@Frankenstine

I would try p7zip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question