9 examples for zip

{{ score }}
  # Zips up everything in my current directory recursively into the file archive.zip
zip -r archive.zip *
{{ score }}
  # put README.txt and test.c into the zip file named archive.zip
zip archive.zip README.txt test.c
{{ score }}
  # Recursively zip all files in the directory foo into foo.zip
zip -r foo foo
{{ score }}
  # Recursively zip everything, starting from the current directory, that matches the given pattern into archive.zip
# Note: the `R` flag is case sensitive!
zip -R archive "*.png"
zip --recurse-patterns archive "*.png"
{{ score }}
  # Use the `unzip` command to extract a zip file, unlike `tar` and `gzip` where you use a command line argument to decompress
unzip file.zip # Extracts to current directory
unzup file.zip -d dir # Extracts to specified directory
{{ score }}
  # Create a password protected ZIP file
zip -e archive.zip file.txt
{{ score }}
  # Zip a directory and password protect it from a password file
# Very useful for backup scripts!
zip -r directory.zip directory/ -P`cat ~/securezippassword`
{{ score }}
  # store across a set of zip files each no bigger than 1GB
zip -s 1g archive.zip really_big_file.iso
{{ score }}
  #'zip' ~ Comments starting with #~ are removed ~ ~ Example for command 
#'man': ~ # Opens up the manual page for the command 'ls' ~ man ls

# Create Zip Archive File
zip -r opendevops.zip opendevops

# Extract Zip File to specific or different directory
unzip opendevops.zip -d /tmp/unziped