DEV Community

San
San

Posted on • Updated on

You can upload any zip file to your server using any FTP or SFTP and need to install unzip.

You can upload any zip file to your server using any FTP or SFTP
and need to install unzip.

You need to install the unzip package.

sudo apt-get install unzip

Enter fullscreen mode Exit fullscreen mode

You may request an admin password and need to grant the Ubuntu package manager, called apt, to occupy additional disk space with programs. Enter the password and answer 'yes' when needed. After all the packets have been installed, type in a terminal:

unzip archive.zip 
Enter fullscreen mode Exit fullscreen mode

If you want to extract the zip file to another folder, you will need to use the -d key followed by the directory path. Type:

unzip file.zip -d destination_folder
Enter fullscreen mode Exit fullscreen mode

for example:

unzip mysite.zip -d /var/www
Enter fullscreen mode Exit fullscreen mode

will extract the contents of the archive mysite.zip to the folder /var/www. The directory path can be full or relative.

Here:
After coming to the directory where your zip file is uploaded path.
In: /var/www/project "Folder" code.zip is present
Then run cmd:

**/var/www/project#**:- unzip code.zip -d /var/www/project                                                                                           
Enter fullscreen mode Exit fullscreen mode

Make zip file

  • npm install zip -g
zip -r newtest.zip /var/www/forntend/
Enter fullscreen mode Exit fullscreen mode

Top comments (0)