Creating and Extracting Zip Files

compressed file is a sort of archive that contains one or more files that have been reduced in size. Since these files are smaller, they can be stored without taking up much space, or transferred at higher speeds over the Internet. You can then decompress the file or files back into their original state without any degradation. 

Creating Zip Files in DirectAdmin 
  1. Log in to Your DirectAdmin 
  2. Go to System Info & Files > File Manager 
  3. Navigate to folder where compressed file was uploaded. 
  4. Right click and select “Add to archive”. 
  5. Then you can choose the destination folder (path), name and compression type (zip or tar.gz) 
  6. After that click “COMPRESS“. 
Extracting 
  1. Log in to Your DirectAdmin 
  2. Go to System Info & Files > File Manager 
  3. Use the file manager to navigate to folder where compressed file was saved. 
  4. Right click and select “Extract”  
  5. Navigate to the directory where it should be extracted (directory must exist) and click “Extract”. 
Compressing files via CLI (Command-Line Interface) 

The following commands will allow you to compress your files and directories into a compressed file such as .zip, .tar, .gz,  etc. 

This will also allow you to decompress the contents back into their original state. 

To extract and compress files login to your server via SSH. 

To extract .zip files the command would be as follows: 

unzip archive.zip

To compress: 

zip file.ext

To extract .gz files: 

gzip -d archive.gz

To compress: 

 gzip file.ext

To extract .tar files: 

tar -xvf archive.tar

To compress: 

tar -cvf archive.tar file1.ext file2.ext /path/to/folder

To extract .tar.gz files: 

tar -xvzf archive.tar.gz

To compress: 

tar -cvzf file.tar.gz file1.ext file2.ext /path/to/folder
Compression in FTP

FTP does not do compression of any kind. It just sends the files over the file transfer protocol. So, you to need compress the files before doing the transfer, then decompress them after using one of the two methods described above – control panel or CLI.