How do I zip/unzip a directory? [Ubuntu]

ZIP

FTP do have two modes: binary and ASCII. By default most clients use ASCII mode, which breaks your binary files completely. I don’t know which FTP client you are using, but for example in ncftp you can use command “binary” to switch to binary mode.

If you want to create ZIP files using Ubuntu (or almost any other Linux), use zip. You can install it to Ubuntu by running

sudo apt-get install zip

Then you can create zip file by running

zip -r compressed_filename.zip foldername

UNZIP

If you want to extract to a particular destination folder, you can use:

unzip file.zip -d destination_folder
 
(Visited 67 times, 1 visits today)
Spread the love