First commit
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
.DS_store
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
The basic syntax for the `zip` command is:
|
||||||
|
```bash
|
||||||
|
zip [options] zipfile files/directories
|
||||||
|
```
|
||||||
|
|
||||||
|
Common options include:
|
||||||
|
- `-r`: Recursively include files in directories
|
||||||
|
- `-q`: Quiet mode (less output)
|
||||||
|
- `-v`: Verbose mode
|
||||||
|
- `-u`: Update existing entries if newer
|
||||||
|
- `-9`: Maximum compression
|
||||||
|
- `-0`: Store files only, no compression
|
||||||
|
- `-e`: Encrypt the zipfile with a password
|
||||||
|
|
||||||
|
Some common examples:
|
||||||
|
```bash
|
||||||
|
# Create a zip archive of multiple files
|
||||||
|
zip archive.zip file1.txt file2.txt
|
||||||
|
|
||||||
|
# Create a zip archive of a directory and all its contents
|
||||||
|
zip -r archive.zip directory/
|
||||||
|
|
||||||
|
# Create an encrypted zip file
|
||||||
|
zip -e secure.zip confidential.txt
|
||||||
|
|
||||||
|
# Add/update files in an existing zip
|
||||||
|
zip -u archive.zip newfile.txt
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user