If you want to zip file and exclude some directory while file zip in linux you can simply use the below command.
zip -r filename.zip folder -x folder1 folder2
Where as folder is the going to zip in the name of filename.zip and folder1 and folder2 will be exclude from while zipping.