SSH zip command

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.

Archive a single or several specific files using the SSH zip command

zip zipArchiveThatWillBeCreated.zip fileToArchive # single file

zip zipArchiveThatWillBeCreated.zip fileToArchive-1 fileToArchive-2 fileToArchive-3 # multiple files

Archive entire directory using SSH zip command

zip -r /path/to/directory

Excluding files when archiving with Linux zip command

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

Unzipping with SSH

unzip zippedArchive.zip
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Linux tar Command

The Linux tar command is used to compress and extract files to and from an archive. In this...

How to Install WordPress via SSH

Since WordPress is the most widely used CMS it’s installation process has been made as simple and...

SSH Execute Command on a Remote server

Via SSH you can connect to a remote server’s shell. This will allow you to execute commands on...

How to connect to your shared hosting account via SFTP with FileZilla

SFTP is a convenient way to use SSH, while also using the interface of a simple FTP. In order to...

SSH netstat command

If you wish to debug or track statistics of your network in a Linux environment you can use SSH...