Skip

zip -r file.zip folder/

This is a typical command that I use for the zip directory, however it is located on the active site, so the images are constantly deleted / updated. Converting to a command is not performed because the file was there when it started the process, but not there when it actually compressed it (at least from what I see).

I have no way to stop editing files in this case, so I hope that just skipping them, the number of editable images compared to the huge directory size is insignificant. therefore, 2-3 files, changing from 100,000, nothing, but the error completely stops the compression.

I tried to find a way around this, but with no luck, I could just look in the wrong direction, but I feel that this is impossible, because it is impossible.

Here is an example error:

 zip I/O error: No such file or directory zip error: Input file read failure (was zipping uploads/2010/03/file.jpg) 

Is there a way to use a zip command or something similar to a zip folder, but if it gets into an error when it gets to a file, does it just skip it?

+6
source share
1 answer

tar always a good compression option on Linux. Remember that zip may also have a file size limit size .

 tar vcfz file.tar.gz folder 
+9
source

Source: https://habr.com/ru/post/974512/


All Articles