terminal compress folder code example
Example 1: zip folder terminal
zip -r mynewfilename.zip foldertozip/
Example 2: compress file in terminal
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
zip -r mynewfilename.zip foldertozip/
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file