UNIX: Zip Example

Can you provide zip command examples under UNIX? How do I use zip command under UNIX operating systems?

The zip command under UNIX is use for a compression. It works as a file packaging utility for the following operating systems:

ADVERTISEMENTS

  1. Unix
  2. VMS
  3. MSDOS
  4. OS/2
  5. Windows 9x/NT/XP,
  6. Minix
  7. Atari
  8. Macintosh
  9. Amiga
  10. Acorn RISC OS.

The command is tottally compatible with PKZIP (Phil Katz’s ZIP for MSDOS systems). The zip command is pretty good for packaging a set of files for distribution and/or for archiving files; and for saving disk space by temporarily compressing unused files or directories.

Simple Examples

The syntax is as follows:

zip file.zip file1.txt file2.doc photo.jpg ...

To zip resume.doc and all *.c file, enter:
zip bacup.zip resume.doc *.c
To zip data directory, enter:
zip -r backup.zip data

See also:

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.