Linux

  1. Home
  2. Computing & Technology
  3. Linux
photo of Juergen Haas

Juergen's Linux Blog

By Juergen Haas, About.com Guide to Linux since 2003

Archiving With The zip And unzip Commands

Sunday January 4, 2009
The zip program is a useful tool for archiving or transferring a set of files. A simple command like "zip archive dir" can quickly package a whole directory into a single compressed archive file (often called "zip file"). Depending on the type of files being packaged, the size of the archive often gets compressed to a fraction of the size of the original files.

Such archive files are therefore well suited for backups or emailing. The file format used by zip is standard across most operating systems and is therefore also a good way to transfer data between diverse computer systems.

The reverse operation, extracting the files and directories from an archive file, is accomplished with the unzip command. For example, the command "unzip docs" extracts all files and directories of the archive file "docs.zip" into the current directory.

Detailed information on the options of the zip and unzip commands can be found on their man pages (zip, unzip).

Comments

January 8, 2009 at 2:01 pm
(1) twoHats says:

First - Thanks Juergen, for this blog. Now as to this particular topic…

I have been trying to use zip and unzip to backup some large directories and have run into a few problems that man doesn’t cover. This topic could use more than the light coverage given here. I have been using pkzip since it came out (back in the bad old law suite days) but zip on Linux seems to add some challenges.

Thanks again for the blog

January 12, 2009 at 7:12 am
(2) humberto fuentealba says:

Nice work,

linux commands are a powerful tools but at this time most of users choose the GUI instead of do it yourself via command.

@twoHats try to use tar compressed with gzip.

bye

June 11, 2009 at 2:42 am
(3) Andrew says:

Alternatively, if you have a browser and java installed, you could just use www.ezyzip.com.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss

Community Forum

Explore Linux

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Linux

  1. Home
  2. Computing & Technology
  3. Linux

©2009 About.com, a part of The New York Times Company.

All rights reserved.