From 4fd2c0f3fb659b973298f551d7be452ec0a4ef30 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 17 Apr 2022 23:39:02 +0200 Subject: [PATCH] Added zip notes to the knowledge base --- knowledge base/zip.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 knowledge base/zip.md diff --git a/knowledge base/zip.md b/knowledge base/zip.md new file mode 100644 index 0000000..fe175d4 --- /dev/null +++ b/knowledge base/zip.md @@ -0,0 +1,20 @@ +# Zip + +## TL;DR + +```shell +# recursively compress everything in the current directory to an archive named 'foo.zip' +zip -r foo . + +# recursively compress two folders and a file to an archive named 'bar.zip' +zip -r bar folder1 folder2 file.txt + +# list all files in the archive 'foo.zip' with info +unzip -Zl foo.zip +``` + +## Further readings + +- [cheat.sh] + +[cheat.sh]: https://cheat.sh/zip