How can I create a archive/zip of a whole directory via terminal?

Create Zip file using Ubuntu command
Create Zip file using Ubuntu command

For creating the zip you have installed zip. For installing zip execute the below command to terminal

 sudo apt-get install zip  

After the install the zip executes the below command into the terminal for creating zip files

 zip -r myfiles  

-r (recursive) –r  option is zip whole directories and files trees at once

 myfiles is the directory path which needs  to convert into a zip file.

produced zip name of the zip which have the directory structure as well as the files .

You can also tell where the zip file will. Here is the example /home/ubuntu/, will store at home /home/ubuntu/ path.

 The zip command comes with documentation telling you about all of its (many) options; type
 man zip  
to see that documentation.

Nikunj K

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.