Linux Commands Helper
💬 Your AI-powered Linux assistant
zip Command - Compress Files
The zip command is used to compress files and directories into a ZIP archive. It is commonly used for packaging and distributing files on Linux and other platforms.
Syntax
zip [options] archive.zip file1 file2 ...
Examples
zip files.zip file1.txt file2.txt
Compress file1.txt
and file2.txt
into files.zip
.
zip -r archive.zip folder/
Recursively compress the folder/
directory into archive.zip
.
zip -d files.zip file1.txt
Delete file1.txt
from the files.zip
archive.
Notes
- zip archives can be extracted with the
unzip
command. - Use
-r
to include directories and their contents recursively. - zip is widely supported across different operating systems.