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:
- Unix
- VMS
- MSDOS
- OS/2
- Windows 9x/NT/XP,
- Minix
- Atari
- Macintosh
- Amiga
- 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:
🐧 0 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |