How do I zip & download files on an ubuntu server? [closed]

I have gotten SSH access into an EC2 instance of Ubuntu.

I want to zip an entire folder, and download it to my local machine.

The folder is large – 2GB+.

How do I do that?


The are several ways to do what you want, one of them, assuming your local machine is a Windows one, would be:

  1. Acces via putty onto the ubuntu machine
  2. use tar to archive and compress the directory, for example using bzip2

    tar cjvf /path/to/target/archive.tar.bz2 /path/to/directory/to/compress
  3. use psftp, access to the ubuntu machine and download the tar file

Read the tar(1) manual page for more details.

Source : Link , Question Author : marc.gayle , Answer Author : dawud

Leave a Comment