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:
- Windows 9x/NT/XP,
- 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.
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