Thursday, January 8, 2015

How to zip and unzip on Lubuntu


Okay, i'm going to show you another beginners tutorial, which is creating zip file and also unzip it on lubuntu linux.

To compress/create a zip file on lubuntu we can use the zip command, and for uncompress we can use the unzip command.

Both command are available pre-installed on lubuntu, so we can go ahead and use it without installing.

How to compress a file on lubuntu

Use zip command to compress (zip) a file, like this:

zip [name-of-the-zip-file] [the-file-to-be-compress]

zip data.zip data.txt

zip testing.zip pic.jpg

How to compress directory on lubuntu

To compress a folder with content inside, you need to add -r parameter, like this:

zip -r [name-of-the-zip-file] [directory]

zip -r mydata.zip ~/Downloads/

zip -r secret.zip ~/Documents/

How to unzip a compressed file on lubuntu

To unzip is very simple, we can use the unzip command, like this:

unzip [name-of-the-zip-file]

unzip mydata.zip

unzip secret.zip

That's it, now you know how to create a zip file/compress and also how to unzip it/uncompress, very simple isn't it?

As an alternative you can also use gzip or gunzip command, they basically the same, both can be use to compress and uncompress zip file.

Besides zip file, for compression on linux, you can also create a tar, tar.gz, and tar.bz2 files which i will explain on different article.

No comments:

Post a Comment