Reading Time: 2 minutes
In this tutorial ” ZIP command in Linux with examples “, We will explain what is ZIP command and how you can use ZIP command in linux.
Table of Contents
What is ZIP
zip is a compression and file packaging utility for Unix, VMS, MSDOS, OS/2, Windows 9x/NT/XP, Minix, Atari, Macintosh, Amiga, and Acorn RISC OS. It is analogous to a combination of the Unix commands
tar(1) and compress(1) and is compatible with PKZIP (Phil Katz’s ZIP for MSDOS systems).
Options in ‘Zip’ command in Linux
You can use multiple options in ZIP commands however there are some common options that you will use frequently.
Example:
In this example, I will show you how you can zip a file, You have a file name as “testfile.txt” and if you want to use zip this file then use commands.
$ zip testfile.zip testfile.txt
Here: testfile.zip is the new zip file name and testfile.txt is the actual file that you want to zip
ZIP command in Linux with examples
ZIP Directory in Linux
$ zip tmpdir.zip /tmp/
How to unzip file in Linux
You can unzip files using “unzip” command in linux
$ unzip testfile.zip
You can go through Linux Tutorials.
More details about zip can be browsed here