Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Zip of directory in Unix m/c

Tags:

unix

on Unix m/c i have folder in which there are few more folders.. I wants to make zip file of parent folder. and i should able to unzip this zip file in windows m/c.. Can you please advice..

thanks in advance..

like image 420
madhu Avatar asked Mar 16 '11 20:03

madhu


People also ask

How do I zip a directory in Unix?

The easiest way to zip a folder on Linux is to use the “zip” command with the “-r” option and specify the file of your archive as well as the folders to be added to your zip file. You can also specify multiple folders if you want to have multiple directories compressed in your zip file.

How do you create a zip file in Unix?

Syntax : $zip –m filename.zip file.txt 4. -r Option: To zip a directory recursively, use the -r option with the zip command and it will recursively zips the files in a directory. This option helps you to zip all the files present in the specified directory.

How do you make a folder zip?

Right-click on the file or folder.Select “Compressed (zipped) folder”. To place multiple files into a zip folder, select all of the files while hitting the Ctrl button. Then, right-click on one of the files, move your cursor over the “Send to” option and select “Compressed (zipped) folder”.

How do you zip multiple files in Unix?

In order to zip multiple files using the zip command, you can simply append all your filenames. Alternatively, you can use a wildcard if you are able to group your files by extension.


2 Answers

given that the program 'zip' is available, the following should work:

zip -r archive_name.zip folder
like image 182
dcn Avatar answered Oct 14 '22 21:10

dcn


From midnight commander highlight the directory that you want to zip, then press F2 to get to the user menu, then @ to perform an operation on it. You can now enter zip -r archive.zip followed by return, where archive.zip is that name of the zip file that you want to create.

like image 44
Lawrence Woodman Avatar answered Oct 14 '22 21:10

Lawrence Woodman