Enterprise WordPress Cloud Now Starting at
$6.99/mo
Affiliate Program
Testimonials
Contact
+1 (877) 767 4678
+44 736 158 8774
24x7x365 Support
Search in titles only
Search in Linux Hosting only
Search
+ Advanced Search
Login or Sign Up
Logging in...
Remember me
Log in
Forgot password or user name?
or
Sign Up
Log in with
Forums
Blogs
Knowledgebase
Groups
Forum
Peer-to-Peer Support
Linux Hosting
If this is your first visit, be sure to check out our
FAQ
. You may have to Register before you can post: click here to
Register
.
Unable to Zip one subfolder and exclude all subfolders
Collapse
Unconfigured Ad Widget
Collapse
X
Collapse
Posts
Latest Activity
Photos
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Rex Maughan
Senior Member
Join Date:
Mar 2022
Posts:
220
Share
Tweet
#1
Unable to Zip one subfolder and exclude all subfolders
04-01-2025, 09:29 AM
Hey,
I have a problem when zipping a folder. Let's say I have a folder Project with node_modules to be excluded, but I want to include only node_modules/mydir in my zip.
Any Suggestions?
Clay Page
Senior Member
Join Date:
Sep 2022
Posts:
127
Share
Tweet
#2
04-02-2025, 06:06 AM
Your problem can be solved by using the zip command with -x to exclude everything under node_modules/ except node_modules/mydir.
Just run the following command:
zip -r project.zip Project -x "Project/node_modules/*" "Project/node_modules/mydir/*"
Hope it works.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment