From 39fbcae0b7b5043204d009090f1906bd6fc67e6e Mon Sep 17 00:00:00 2001 From: bonnie Date: Sun, 19 Jul 2020 22:28:38 +0800 Subject: [PATCH] Others - Zip the content of a directory without including the directory itself --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a11001a..7273844 100644 --- a/README.md +++ b/README.md @@ -3045,6 +3045,13 @@ tar xopf file.tar tar xvf -C /path/to/directory filename.gz ``` +##### Zip the content of a directory without including the directory itself +```bash +# First cd to the directory, they run: +zip -r -D ../myzipfile . +# you will see the myzipfile.zip in the parent directory (cd ..) +``` + ##### Output a y/n repeatedly until killed ```bash # 'y':