zip folder in command line code example Example: zip folder terminal zip -r mynewfilename.zip foldertozip/