For zipping up an entire directory, use the command:

zip -r directory directory


This creates the archive directory.zip, containing all the files and directories in the directory directory that is contained within the current directory.

zip directory *


This creates a zip file named directory.zip and contains all the files on the current working directory.

zip -j directory directory/*

You can use this if you want to create a zip archive and omits its directory name.

-j option - Store just the name of a saved file (junk
the path), and do not store directory names. By default, zip will store the full
path (relative to the current path).


Recommended buys!

0 comments