archiving files
Note
- foobar.txt represents the filename of a text file containing a list of any files and/or directories to be excluded from the ZIP archive file to be created.
- foobar.zip represents the filename of the ZIP archive file to be created.
In Ubuntu, use zip -r ../foobar.zip . -x@foobar.txt
to create a ZIP archive file of the contents of the current directory, including hidden files and hidden directories but excluding any files and/or directories specified in foobar.txt, saving the file into the parent directory. This requires Info-ZIP.
explanation
Note
This is an incomplete explanation.
- The
-r
option enables recursion. - The
-x@foobar.txt
option enables the exclusion of any files and/or directories specified in foobar.txt.
prior work
- The method of excluding files and/or directories from a ZIP archive to be created was introduced to me by an answer on Ask Ubuntu by Isaiah.
- The method of including hidden files and hidden directories in a ZIP archive to be created was introduced to me by an answer on Stack Overflow by Gunnar.
- The method of including the contents of the current directory in a ZIP archive to be created was introduced to me by an answer on Unix & Linux Stack Exchange by Romeo Ninov.
licensing
No rights reserved: CC0 1.0.