zip 压缩后的文件名  文件位置
压缩文件夹加-r (r递归)br/>例:
压缩文件
[root@localhost ~]# zip a.zip /etc/passwd
  adding: etc/passwd (deflated 61%)br/>[root@localhost ~]# ll
总用量 13424br/>-rw-r--r--. 1 root root    1087 12月  4 21:08 a.zip
压缩文件夹
 [root@localhost ~]# zip -r grub.zip /boot/grub2/
[root@localhost ~]# ll -h
总用量 17M
-rw-r--r--. 1 root root 1.1K 12月  4 21:08 a.zip
-rw-r--r--. 1 root root 7.7M 12月  4 19:36 grub.tar
-rw-r--r--. 1 root root 2.5M 12月  4 20:57 grub.tar.bz2
-rw-r--r--. 1 root root 3.1M 12月  4 20:49 grub.tar.gz
-rw-r--r--. 1 root root 3.2M 12月  4 21:12 grub.zip
压缩一类文件
zip   img.zip  *.jpg   利用通配符