💻 Software
Zipping all files/dirs in a directory except hidden ones?
Fresh7 days ago
Mar 15, 202622218 viewsConfidence Score0%
0%
Problem
How can I make a zip of all the files and subdirectories in the directory , except all those files/dirs that begin with a ? The command: ...will include everything. For example, if I have: I'd like foo and bar to be included in , but not .hello. How can I do this?
Error Output
zip -r mydir.zip mydir/
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Zipping all files/dirs in a directory except hidden ones?
Low Risk
This works for me: @Joe Internet, @Dariusz: normal shell patterns won't work properly because zip matches against the full path+filename internally (as the zip manual explains... ;) )
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix