Zip a directory
Task: zip the directory named "foo", it's sub directories and files located at /the/containing/directory/foo
1. Move to the location containing the directory you want to zip up:
$ cd /the/containing/directory/
2. Zip the directory named "foo" to a zip file named "foo.zip"
$ zip -r0 foo foo
Note: "-r" = recursively "0" = default compression level
3. If you want to check that the zip file named "foo.zip" now exists, use the "ls" command
The "ls" command will list all files and directories in the directory you are currently in, you should see your zip file "foo.zip" in the list.
Was this answer helpful?
Task: Delete the directory named "foo" located at /the/containing/directory/foo1. Move to the...