zip command not working

后端 未结 7 904

I am trying to zip a file using shell script command. I am using following command:

  zip ./test/step1.zip $FILES

where $FILES contain all the

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-13 06:41

    I just discovered another potential cause for this. If the permissions of the directory/subdirectory don't allow the zip to find the file, it will report this error. Actually, if you run a chmod -R 444 on the directory, and then try to zip it, you will reproduce this error, and also have a "stored 0%" report, like this:

    zip warning: name not matched: borrar/enviar adding: borrar/ (stored 0%)

    Hence, try changing the permissions of the file. If you are trying to send them through email, and those email filters (like Gmail's) invent silly filters of not sending executables, don't forget that making permissions very strict when making zip compression can be the cause of the error you are reporting, of "name not matched".

提交回复
热议问题