Zip Files in Ubuntu CLI
December 8, 2007 13 Comments
If you want to work with zip files in Ubuntu command line interface, you will need these commands: zip and unzip.
Zip
To install zip if you don’t already have it, do this
sudo apt-get install zip
The simplest way to create a zip file (archive) is
zip myzipfile.zip file1 file2 file3 ...
Where myzipfile.zip is the file (zip archive) you are creating and file1, file2, file3, and so on, are the files you are including in that archive. So let’s say you need to create a zip file of your resumé which is in different file formats, you would something like
zip myresume.zip resume.odt resume.pdf resume.doc resume.txt
Unzip
To unzip files, you need to have a command called unzip. To install unzip if you don’t already have it, do this
sudo apt-get install unzip
The simplest way to extract all files from a zip archive is
unzip myzipfile.zip
Where myzipfile.zip is the file (zip archive) you are unzipping. So let’s say you need to extract (unzip) a zip file of your resumé which contains different files, you would something like
unzip myresume.zip
Pingback: Installing a LAMP Server on Slicehost (and maybe elsewhere) « A Life of Constant Flux
Pingback: Installing a LAMP Server, with Wordpress, on Slicehost (and maybe elsewhere) « A Life of Constant Flux
I was staggered that the minimal ubuntu installation did not include zip and unzip. Is there another command-line program that can handle this file type?
thanks a lot dude………..but is there some other way for this zip thingy…………a bit of easy……….
Pingback: Daily Digest for September 21st | piersonthe.net
Pingback: Daily Digest for September 22nd | piersonthe.net
Thanks,
This was indeed easy to follow and helpful.
Cheers
It is very helpful……thank you for your post.
Thx man…:=)) very easy:))!
even though i used this technique for python code … this saved me a half a day … thank you
in Windows 7 64-bit
I am using WinRar to unzip file of format .zip
it was not a successful unzip.
when i tried to unzip same file on Ubuntu
i was successfully able to unzip that file.
when i tried to move that file to windows7, i got error !
by the way, the file was compressed on Ubuntu.
???
If I use the command to install zip command line tool on the server I get the message that there is no installation package available.
I need it for a friend of mine and I use only CentOS with Webmin/Virtualmin on all my servers. (On this server is Ubuntu 10.04 with Plesk 10)
It would be helpful if someone can support me.
- How can I add an respository to the server that I can install the zip command line tool?
- Is there another way to add it.
Thx
Just Awesome..!!!