by
0
5
3,474
1
Top 1% !
Popular
Famous
Specified
OpenSource
Popularity: 3543rd place
Created
Modified May 4, 2013
No tags for this snippet yet.
Languagebash
LicenseMIT_X11
OSLinux

Bash command to zip some content

This command will zip the file file.txt and all the sh files contained in setup folder in a zip named myzip.zip.
Then adds the file Third/otherfile.txt in then same archive with the last command
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1054/Bash-command-to-zip-some-content?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
ZIP_NAME="myzip.zip" zip "$SETUP_ZIP_DIR"/$ZIP_NAME setup/*.sh file.txt zip -g "$SETUP_ZIP_DIR"/$ZIP_NAME Third/otherfile.txt
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus