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.
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
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
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