Skip to content

Commit 395ac3a

Browse files
committed
added zip file
1 parent dbd514a commit 395ac3a

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.github/workflows/mergeFiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Merge MD Files
2020
run: |
2121
# Define the order of markdown files to merge
22-
files_to_merge=("index.md", "navigation.md", "files.md", "ssh.md", "scp.md", "sed.md", "grep.md", "awk.md", "searchingFiles.md", "netstat.md", "lsof.md", "curl.md", "wget.md", "dig.md", "redirection.md", "process_substitution.md")
22+
files_to_merge=("index.md", "navigation.md", "files.md", "ssh.md", "zip.md", "scp.md", "sed.md", "grep.md", "awk.md", "searchingFiles.md", "netstat.md", "lsof.md", "curl.md", "wget.md", "dig.md", "redirection.md", "process_substitution.md")
2323
# remove existing contents readme
2424
echo '' > README.md
2525
# Merge files in the specified order

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
1. [Linux Navigation Byte](#linux-navigation-commands)
66
2. [Files & Directories Byte](#files-and-directories)
77
3. [SSH Byte](#ssh-command)
8+
3a. [Zip Byte](#zip-command)
89
4. [SCP Byte](#scp-command)
910
5. [Sed Byte](#sed-command)
1011
6. [Grep Byte](#grep-command)

zip.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## ZIP Command
2+
> To make .zip from folders we use this utility. It does not preserve ownership information. To preserve it, we should use `tar` utility.
3+
```shell
4+
## SYNTAX
5+
## zip OPTIONS ARCHIVE_NAME FILES
6+
zip files.zip file1 file2
7+
8+
# suppress the output
9+
zip -q files.zip file1 file2 file3
10+
11+
# archive a directory
12+
zip -r files.zip filesDir/
13+
14+
# add other files to the zip as well
15+
zip -r files.zip filesDir/ file1.txt ../shoaib/files.txt
16+
17+
## By default compression method used is : deflate
18+
## SUPPORTED METHODS:
19+
## 1. deflate
20+
## 2. bzip2
21+
# if a file cannot be compress,it stored as is
22+
zip -r -Z bzip2 filesDir/
23+
24+
# specify compression level from 0-9
25+
# default is 6 and 0 is no compression
26+
zip -9 -r hello.zip filesDir/
27+
```

0 commit comments

Comments
 (0)