Tente este comando
pushd /Users/myUser/Desktop && zip -r ./temp.zip ./Assets && popd
Eu estou tentando zipar uma pasta do comando terminal (dado abaixo)
zip myZip.zip path\ Of\ the\ Folder
O comando acima fornece o resultado abaixo indicado
émeucomandoerrado.Porfavor,ajude,eutenhoquefazerissoapenascomocomandodoterminal.
Editar
Eutambémtenteiessescomandosenenhumdelesfuncionou.(Resultadostambémsãodados)
NO.1
n:~myUser$zip-rabc.zip/Users/myUser/Desktop/Assets/img\for\seg/adding:Users/myUser/Desktop/Assets/imgforseg/(stored0%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaacopy3.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaacopy6.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaacopy64.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaacopy7.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaacopy.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaamoe.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaamoved.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/aaaa.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/movedaaaa.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/ScreenShot2015-12-11at1.jpg(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/Screen-Shot-2015-12-11-at-1.17.11-pm_03.png(deflated19%)adding:Users/myUser/Desktop/Assets/imgforseg/Screen-Shot-2015-12-11-at-1.17.11-pm_05.png(deflated21%)adding:Users/myUser/Desktop/Assets/imgforseg/Screen-Shot-2015-12-11-at-1.17.11-pm_10.png(deflated26%)n:~myUser$
Não.2
n:~myUser$zipmyZip.zip/Users/myUser/Desktop/Assets/img\for\segadding:Users/myUser/Desktop/Assets/imgforseg/(stored0%)n:~myUser$
Não.3
n:~myUser$zipmyZip.zip-r/Users/myUser/Desktop/Assets/img\for\segupdating:Users/myUser/Desktop/Assets/imgforseg/ScreenShot2015-12-11at1.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/Screen-Shot-2015-12-11-at-1.17.11-pm_03.png(deflated19%)updating:Users/myUser/Desktop/Assets/imgforseg/Screen-Shot-2015-12-11-at-1.17.11-pm_05.png(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/Screen-Shot-2015-12-11-at-1.17.11-pm_10.png(deflated26%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaacopy3.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaacopy6.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaacopy64.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaacopy7.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaacopy.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaamoe.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaamoved.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/aaaa.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/movedaaaa.jpg(deflated21%)updating:Users/myUser/Desktop/Assets/imgforseg/(stored0%)n:~myUser$
Editar2:Oscomandosacimaestãofazendoumzip,masozipnãotemnenhumconteúdoqueestejapresentenapastaatual(pastadeorigem)
Se você quiser compactar uma pasta e seu conteúdo, precisará das opções -r
(recursiva).
Para referência: