zip file terminal code example
Example 1: terminal zip
# to compress
tar -zcvf archive_name.tar.gz folder_to_compress
# to extract
tar -zxvf archive_name.tar.gz
# the "v" flag is for verbose and is not required
Example 2: ubuntu zip file
zip -r example.zip original_folder
Example 3: compress file in terminal
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file