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 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

SSH ip command

If you wish to obtain information about your server’s IP on a Linux machine using SSH you can use...

SSH rm command

If you wish to remove a file or folder from your Linux system you can use SSH rm command. In this...

SSH echo command

One of the most useful commands in a Linux environment is echo. With it, you can provide output...

SSH history command

If you wish to find what commands you have previously executed in a Linux environment you can use...

SSH cd command

SSH cd command is mainly used to navigate in your Linux environment. In this article, we’ll show...

Powered by WHMCompleteSolution