需求:将/home/scan/result.txt文件打包为result.zip文件
使用方式1:zip -r result.zip /home/scan/result.txt
使用方式2:zip -j result.zip /home/scan/result.txt
两种方式都可以实现需求,区别在于-r参数会递归的将目标文件的目录一起打包,因此生成的result.zip文件解压后会包含/home/scan的目录,而-j参数则只会讲最终的result.txt文件打包。
|
|
睡不着的卡布奇诺 · spring ...· 1 年前 · |
|
|
风流倜傥的蛋挞 · Android ...· 2 年前 · |
|
|
犯傻的麻辣香锅 · winapi - Pythons ...· 2 年前 · |
|
|
光明磊落的米饭 · 手把手教你使用Openpyxl库从Excel ...· 2 年前 · |