How to unzip and zip files on Centos Ubuntu and Windows

How to unzip and zip files on Centos Ubuntu and Windows

There are many ways or commands to unzip files on the Linux Servers. We are going to explain all the unzipping methods available on the Linux machine. If you are using Ubuntu Server then we need to install a zip package for compressing.

To Compress files on the Ubuntu Server,

sudo apt-get install zip -y

If you want to unzip files on Centos Server then we need to install unzip package with the following command.

yum install unzip -y

 

Now to zip files, execute the following command on the terminal.

zip first  test1 test2 test

 

The above-mentioned command will make a new zip file with name first.zip, which will have all the files test1, test2, test. If you want to zip a directory having files then execute the following command.

zip -r  directory.zip directoryname/

 

Unzip zip Files command on Ubuntu or Centos Server

unzip directory.zip

To unzip the file into a specific directory then you can use the following command.

unzip -d /home/user/ file.zip

 

Unzip  files with tar command
tar xvf filename.tar

 

Extract Files with Gunzip Command
gunzip filename.gz

 

How to Compress and Unzip files on Windows 10.
  •  Select the files you want to compress then Right-click on the Windows 10 machine.
  • Click on the send-to Compressed option. Add the name of the zip file.
  • You have your new zip file in the same directory.

 

Unzip files on the Windows 10
  • Right-click on the newly created zip file
  • Click on the Extract option and select the destination folder.
  • Done

 

If you like this article then do check out our guide on How to Connect Aws RDS Mysql Instance with phpMyAdmin.

https://www.myserverfix.com/configure-aws-rds-mysql-instance-with-phpmyadmin-easy-method-2020/

 

 

Leave a Comment