One of the most used compression methods is zip archiving. On a Linux system, you can use the SSHÂ zip command or the SSH unzip command to manipulate .zip files. In this article, we will show you how to easily use the Linux Zip Command with SSH to create archives.
zip zipArchiveThatWillBeCreated.zip fileToArchive # single file zip zipArchiveThatWillBeCreated.zip fileToArchive-1 fileToArchive-2 fileToArchive-3 # multiple files
zip -r /path/to/directory
zip -r /path/to/directory -x fileToExclude # Excludes just a single file zip -r /path/to/directory -x *.fileFormat # Exclude all files of the given file format
unzip zippedArchive.zip
Test your Linux knowledge with our extensive list of Top SSH Commands for beginners and experts on a Dedicated Server or an SSD VPS machine. Get a new Shared Hosting account with 40% discount OFF the regular price now!