System Status
Buy Now
  • Email & Apps
  • Office 365
Login
  • MyRackspace Portal
  • Cloud Control Panel
  • Rackspace Webmail Login
  • Cloud Office Control Panel
  • Support Home
  • How-To
  • Developer Documentation
  •  Blogs 
    • Expert Insights Tech Blog
    • Rackspace Blog
    • Solve: Thought Leadership

Support Network

End-to-End Multicloud Solutions.   Solving Together.â„¢   Learn more at Rackspace.com

How–To Home

Cloud Servers

  • Introduction
  • FAQ
  • All Articles

Work with ZIP files in Linux

Last updated on:  2020-06-26

Authored by:  Jose Quezada


This article demonstrates how to create and use zip files in Linux®.

Make sure that you have the necessary software:

  • zip

  • unzip

If you don´t have the zip library installed, you can search for it with the following command:

yum whatprovides zip

Install the zip library:

yum install -y zip

Zip

Zip files contain a collection of files in a compressed archive. Use zip files to keep a set of files together, save space, or reduce transmission time.

You can create a zip file from one or more files by using the following syntax:

zip file_name.zip source_file [source_file2 ....]

Or you can create a zip file from a directory by using the following syntax:

zip file_name.zip source_directory

Unzip

The unzip command uncompress a zip file.

To unzip a zip file in the current directory, run the following command:

unzip file_name.zip

To uncompress a zip file to a new directory, run the following commands:

mkdir /path/to/new/extract_directory
unzip file_name.zip -d /path/to/new/extract_directory

Resources

For more information, run the following commands to review the manual pages:

man zip
man unzip

Share this information:

©2020 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

See license specifics and DISCLAIMER

About Rackspace
  • About
  • Customer Stories
  • Events
  • Programs
Blogs
  • The Rackspace Blog
  • Expert Insights Tech Blog
  • Solve: Thought Leadership
  • News
  • Contact Information
  • Legal
  • Careers
Site Information
  • Style Guide for Technical Content
  • Trademarks
  • Privacy Statement
  • Website Terms
Support Network
  • Support Network Home
  • Rackspace How-To
  • API Documentation
  • Developer Center
  • ©2020 Rackspace US, Inc.