How to create and extract archives using SSH?

From time to time you might need to create archives for example to backup some files or extra archives and through that SSH this is done much faster.

Every single archive type has its own command for compressing and extracting. Here are some of the most popular:

To extract a ZIP file, you can use:

unzip archive.zip

To extra a TAR file, you can use:

tar -xvf archive.tar

To extract a tar.gz file, you can use:

tar -zxvf archive.tar.gz

To extra a rar file, you can use:

rar -x archive.rar

One of the most popular archive formats in linux is .tar.gz and we strongly recommend it as well. For compressing files each archive type has its own command as above and here is an example:

tar -zcf archive.tar.gz directory/

  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

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...