Table of Content

I keep forgetting the command to zip a folder in Linux (Red Hat Enterprise Linux 4). And I have even got all files in the folder got zipped individually when I typed the command wrongly, which looked funny to me. The correct command, to remind myself:

zip -9 -r

To zip a single file:

zip -9

Use “-9″ for best compression. The compressed file works fine with Windows XP compression tool.

If you want to extract to a particular destination folder, you can use:
unzip file.zip -d destination_folder

Original: http://blog.enrii.com/2007/05/31/zip-a-folder-in-linux/

Last modified: 20.01.2018

Author

Comments

Write a Reply or Comment

Your email address will not be published.