zip provides classic zip compression. It is handy for cross-platform compatibility with Microsoft operating systems. Newer versions of zip include support for Unicode and encryption. These can be enabled or disabled at built time on Gentoo systems by their respective USE flags (see below).
- Zipsplit -n 102400 sourcecode.zip. The size that you choose cannot be smaller than the size of any of the files in the ZIP file. Using these commands, you can create your own ZIP files, unzip ZIP files you receive, and perform various other operations on them without ever leaving the Linux terminal.
- 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 and compress, and it is compatible with PKZIP.
Zipsplit reads a zipfile and splits it into smaller zipfiles. EXAMPLES To be filled in. BUGS Does not yet support large ( 2 GB) or split archives. SEE ALSO zip(1), unzip(1) AUTHOR Info-ZIP.
The equal and opposite program to zip is unzip, which is included in a separate package (app-arch/unzip).
Installation
USE flags
USE flags forapp-arch/zipInfo ZIP (encryption support)
bzip2 | Use the bzlib compression library |
crypt | Add support for encryption -- using mcrypt or gpg where applicable |
natspec | Use dev-libs/libnatspec to correctly decode non-ascii file names archived in Windows. |
unicode | Add support for Unicode |
Emerge
After adjusting USE flags:
Optionally emergeapp-arch/unzip for unzip capabilities (see the unzip article for more information).
Removal
Configuration
Environment variables
zip does not have any configuration files, however its operation is modifiable by the following environment variables:
- ZIPOPT - Can be used to set any option for the zip command.
- ZIP - Does the exact same thing as the ZIPOPT variable (directly above).
- Zip$Options - For RISC OS use. Does the exact same thing as the ZIPOPT variable (directly above).
- Zip$Exts - For RISC OS use. Contains extensions separated by a
:
(colon) that will cause native filenames with one of the specified extensions to be added to the zip file with basename and extension swapped. - ZIP_OPTS - For VMS use. Does the exact same thing as the ZIPOPT variable.
Usage
ZIP a fileCreates the archive data.zip and puts all the files in the current directory in it in compressed form, type:
Note: No need to add .zip extension or suffix as it is added automatically by zip command.
To zip up an entire directory (including all subdirectories), type the following command:
It is possible to zip a file and save the zip file in another directory by indicating the new destination path with the name of the zip file at the end.
You can also try -9 option for best compressionː
Update one file or more files of the compressed archive, suppose we have compressed an archive then, modified a file. There is a possibility to add the update file to the compressed archive with the zip -u command.
You can replace (freshen) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive. Unlike the update option, this will not add files that are not already in the zip archive.
Invocation
zip
zipcloak
zipnote
zipsplit
Zipsplit
See also
Zipsplit Ubuntu
- P7zip — a command-line port of 7-Zip for POSIX compliant systems such as Unix, OS X, BeOS, and Amiga.
- Tar — an archiver tool that provides the ability to create tar archives, as well as various other kinds of manipulation.
- Unzip — provides decompression for classic zip formats.