zip is a command-line utility that helps you create Zip archives. The zip command takes the following syntax form: zip OPTIONS ARCHIVE_NAME FILES. To create a Zip archive in a specific directory, the user needs to have write permissions on that directory. Zip files do not support Linux-style ownership information.
How does zip command work?
The zip program puts one or more compressed files into a single zip archive, along with information like name, path, date, time of last modification, protection, and check information to verify file integrity. An entire directory structure can be compressed into a zip archive by a single command.
How do I zip a file in Unix?
To create a zip file, enter:
- zip filename.zip input1.txt input2.txt resume.doc pic1.jpg.
- zip -r backup.zip /data.
- unzip filename unzip filename.zip.