UNIX: Zip Example

by on April 16, 2009 · 0 comments· LAST UPDATED April 16, 2010

in

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:

  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:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: