Terminal 9是什么意思,in-r选项:zip-r9${OLDPWD}/包。?
背景: 关于如何为具有依赖项的python代码创建zip文件的AWS文档,请参阅: 我知道-r是递归标志,但我不清楚-r9中的“9”实现了什么Terminal 9是什么意思,in-r选项:zip-r9${OLDPWD}/包。?,terminal,zip,Terminal,Zip,背景: 关于如何为具有依赖项的python代码创建zip文件的AWS文档,请参阅: 我知道-r是递归标志,但我不清楚-r9中的“9”实现了什么 ~/my-function$ cd package ~/my-function/package$ zip -r9 ${OLDPWD}/function.zip . adding: PIL/ (stored 0%) adding: PIL/.libs/ (stored 0%) adding: PIL/.libs/libfreetype-7ce9
~/my-function$ cd package
~/my-function/package$ zip -r9 ${OLDPWD}/function.zip .
adding: PIL/ (stored 0%)
adding: PIL/.libs/ (stored 0%)
adding: PIL/.libs/libfreetype-7ce95de6.so.6.16.1 (deflated 65%)
adding: PIL/.libs/libjpeg-3fe7dfc0.so.9.3.0 (deflated 72%)
adding: PIL/.libs/liblcms2-a6801db4.so.2.0.8 (deflated 67%)
...
-r9
是-r
和-9
开关的组合
开关-9
表示在0到9的范围内的最强压缩
键入
zip
查看选项列表。为了补充@Zerte的答案,这里是zip--help的输出:
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete OS files)
-r recurse into directories -j junk (don't record) directory names
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
-1 compress faster -9 compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-@ read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zipfile prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-y store symbolic links as the link instead of the referenced file
-e encrypt -n don't compress these suffixes
-h2 show more help
如上所述,-r
标志导致递归到目录中