The zip command in Linux and Unix-like systems is used to compress and archive files and directories. It creates a zip archive file with the .zip file extension. The zip command is the counterpart of the unzip command.
Here are a few examples of how the zip command can be used:
To extract files, you'd need to use the unzip command. Here are a few examples:
zip command is widely used to backup, transfer, and share files and directories. It can also be used to compress large files to save disk space. The unzip command can be used to extract the files from a zip archive. You can also use the -r option to include all subdirectories and files recursively. The -i option can be used to include files with a specific pattern or extension.
It's also possible to password protect your archive by using -e option, for example:
zip -e archive.zip directory/
this will prompt you to enter a password to encrypt the archive.