Create zip file in Linux

Okay this time I will explain how to create a zip format file directly by using a terminal or console ..
From the old-time look at the following way:
The example in this case I possessed 3 pieces file.txt located in home directory, and I want to compress the three files into a zip file. Here’s how:

$ cd /home/users/home/
$ ls

Well here’s how to create a zip file

$ zip file1.txt file2.txt file.txt
adding: file1.txt (stored 0%)
adding: file2.txt (stored 0%)
adding: file3.txt (stored 0%)

Well now we check the zip file:

$ unzip -l Archive:
  Length      Date    Time    Name
———  ———- —–   —-
        0  2011-10-07 14:22   file1.txt
        0  2011-10-07 14:22   file2.txt
        0  2011-10-07 14:22   file3.txt
———                     ——-
        0                     3 files

It’s been a way to create a zip file of a file, well now how do I create a zip file folders?. It’s how:

$ zip -r folderzip/ Information

The purpose of the above command is that we compress folderzip (examples folder we want to compress earlier) became

Well now let’s check:

$ unzip -l Archive:
  Length     Date   Time    Name
 ——–    —-   —-    —-
        0  02-11-11 16:46   folderzip/
        0  02-11-11 16:45   folderzip/file1
        0  02-11-11 16:45   folderzip/file2
        0  02-11-11 16:45   folderzip/file3
——–                   ——-
        0                   4 files

may be useful for you . . .

Tinggalkan komentar

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

%d blogger menyukai ini: