The Computer Oracle

How to zip files in mac without root folder

--------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------

Track title: CC C Schuberts Piano Sonata No 13 D

--

Chapters
00:00 Question
00:26 Accepted answer (Score 34)
00:40 Thank you

--

Full question
https://superuser.com/questions/850829/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#mac #terminal #zip

#avk47



ACCEPTED ANSWER

Score 35


I managed to overcome this problem using below command

>cd myfolder
>zip -r name.zip .



ANSWER 2

Score 2


zip -jr name.zip myfolder/*

The -j will junk the path. I'm adding this solution because it was the top link when googling for it.