当前位置:   article > 正文

Ubuntu Desktop Server - 压缩 (zip) 与解压缩 (uzip) 密码保护_ubuntu zip 加密压缩

ubuntu zip 加密压缩

1. Compress + Password

1.1. Compress

在这里插入图片描述

1.2. Other Options -> Password

在这里插入图片描述

2. Extract archive + Password

2.1. Extract Here

在这里插入图片描述

在这里插入图片描述

3. -P - 使用 zip 的密码选项

unzip -P 123456 runtime_lib.zip

strong@foreverstrong:~/demo_workspace/yongqiang$ ls -l
total 173696
-rw-rw-r-- 1 strong strong 177857059 Aug 30 20:55 runtime_lib.zip
strong@foreverstrong:~/demo_workspace/yongqiang$ 


strong@foreverstrong:~/demo_workspace/yongqiang$ unzip -P 123456 runtime_lib.zip 
Archive:  runtime_lib.zip
   creating: runtime_lib/
  inflating: runtime_lib/libcublas.so.8.0  
  inflating: runtime_lib/libcudart.so.8.0  
  inflating: runtime_lib/libcudnn.so.6  
  inflating: runtime_lib/libcurand.so.8.0  
strong@foreverstrong:~/demo_workspace/yongqiang$ 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

zip -r -P 123456 ./runtime_lib.zip ./runtime_lib
unzip -P 123456 runtime_lib.zip

-r 递归处理,将指定目录下的所有文件和子目录一并处理。

strong@foreverstrong:~/demo_workspace/yongqiang$ ll
total 12
drwxrwxr-x  3 strong strong 4096 Aug 30 21:12 ./
drwxrwxr-x 24 strong strong 4096 Aug 30 20:52 ../
drwxrwxr-x  2 strong strong 4096 Apr 18 19:37 runtime_lib/
strong@foreverstrong:~/demo_workspace/yongqiang$ 


strong@foreverstrong:~/demo_workspace/yongqiang$ zip -r -P 123456 ./runtime_lib.zip ./runtime_lib
  adding: runtime_lib/ (stored 0%)
  adding: runtime_lib/libcurand.so.8.0 (deflated 26%)
  adding: runtime_lib/libcudnn.so.6 (deflated 31%)
  adding: runtime_lib/libcublas.so.8.0 (deflated 36%)
  adding: runtime_lib/libcudart.so.8.0 (deflated 71%)
strong@foreverstrong:~/demo_workspace/yongqiang$ 


strong@foreverstrong:~/demo_workspace/yongqiang$ ll
total 173704
drwxrwxr-x  3 strong strong      4096 Aug 30 21:13 ./
drwxrwxr-x 24 strong strong      4096 Aug 30 20:52 ../
drwxrwxr-x  2 strong strong      4096 Apr 18 19:37 runtime_lib/
-rw-rw-r--  1 strong strong 177857059 Aug 30 21:13 runtime_lib.zip
strong@foreverstrong:~/demo_workspace/yongqiang$ 


strong@foreverstrong:~/demo_workspace/yongqiang$ unzip runtime_lib.zip 
Archive:  runtime_lib.zip
   creating: runtime_lib/
[runtime_lib.zip] runtime_lib/libcurand.so.8.0 password: 
  inflating: runtime_lib/libcurand.so.8.0  
  inflating: runtime_lib/libcudnn.so.6  
  inflating: runtime_lib/libcublas.so.8.0  
  inflating: runtime_lib/libcudart.so.8.0  
strong@foreverstrong:~/demo_workspace/yongqiang$ 


strong@foreverstrong:~/demo_workspace/yongqiang$ ll
total 173704
drwxrwxr-x  3 strong strong      4096 Aug 30 21:13 ./
drwxrwxr-x 24 strong strong      4096 Aug 30 20:52 ../
drwxrwxr-x  2 strong strong      4096 Apr 18 19:37 runtime_lib/
-rw-rw-r--  1 strong strong 177857059 Aug 30 21:13 runtime_lib.zip
strong@foreverstrong:~/demo_workspace/yongqiang$ 


strong@foreverstrong:~/demo_workspace/yongqiang$ unzip -P 123456 runtime_lib.zip 
Archive:  runtime_lib.zip
replace runtime_lib/libcurand.so.8.0? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: runtime_lib/libcurand.so.8.0  
replace runtime_lib/libcudnn.so.6? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: runtime_lib/libcudnn.so.6  
replace runtime_lib/libcublas.so.8.0? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: runtime_lib/libcublas.so.8.0  
replace runtime_lib/libcudart.so.8.0? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: runtime_lib/libcudart.so.8.0  
strong@foreverstrong:~/demo_workspace/yongqiang$
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号