ฉันพยายามที่จะ zip โฟลเดอร์จากคำสั่ง terminal (รับด้านล่าง)
zip myZip.zip path\ Of\ the\ Folder
คำสั่งดังกล่าวให้ผลด้านล่าง
เป็นคำสั่งของฉันผิด โปรดช่วยฉันฉันต้องทำด้วยคำสั่งเทอร์มินัลเท่านั้น
แก้ไข
ฉันยังลองใช้คำสั่งเหล่านี้และไม่สามารถใช้งานได้ (ผลลัพธ์จะได้รับด้วย)
NO.1
n:~ myUser$ zip -r abc.zip /Users/myUser/Desktop/Assets/img\ for\ seg/
adding: Users/myUser/Desktop/Assets/img for seg/ (stored 0%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa copy 3.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa copy 6.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa copy 64.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa copy 7.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa copy.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa mo e.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa moved.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/aaaa.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/moved aaaa.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/Screen Shot 2015-12-11 at 1.jpg (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/Screen-Shot-2015-12-11-at-1.17.11-pm_03.png (deflated 19%)
adding: Users/myUser/Desktop/Assets/img for seg/Screen-Shot-2015-12-11-at-1.17.11-pm_05.png (deflated 21%)
adding: Users/myUser/Desktop/Assets/img for seg/Screen-Shot-2015-12-11-at-1.17.11-pm_10.png (deflated 26%)
n:~ myUser$
หมายเลข 2
n:~ myUser$ zip myZip.zip /Users/myUser/Desktop/Assets/img\ for\ seg
adding: Users/myUser/Desktop/Assets/img for seg/ (stored 0%)
n:~ myUser$
หมายเลข 3
n:~ myUser$ zip myZip.zip -r /Users/myUser/Desktop/Assets/img\ for\ seg
updating: Users/myUser/Desktop/Assets/img for seg/Screen Shot 2015-12-11 at 1.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/Screen-Shot-2015-12-11-at-1.17.11-pm_03.png (deflated 19%)
updating: Users/myUser/Desktop/Assets/img for seg/Screen-Shot-2015-12-11-at-1.17.11-pm_05.png (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/Screen-Shot-2015-12-11-at-1.17.11-pm_10.png (deflated 26%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa copy 3.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa copy 6.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa copy 64.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa copy 7.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa copy.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa mo e.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa moved.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/aaaa.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/moved aaaa.jpg (deflated 21%)
updating: Users/myUser/Desktop/Assets/img for seg/ (stored 0%)
n:~ myUser$
แก้ไข 2:คำสั่งด้านบนสร้าง zip แต่ zip ไม่มีเนื้อหาใด ๆ ที่ปรากฏในโฟลเดอร์จริง (โฟลเดอร์ต้นทาง)
zip
ทำที่คุณไม่ชอบ?