Skip to content

Commit

Permalink
added zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyloris committed Apr 20, 2024
1 parent dbd514a commit 395ac3a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/mergeFiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Merge MD Files
run: |
# Define the order of markdown files to merge
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")
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")
# remove existing contents readme
echo '' > README.md
# Merge files in the specified order
Expand Down
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
1. [Linux Navigation Byte](#linux-navigation-commands)
2. [Files & Directories Byte](#files-and-directories)
3. [SSH Byte](#ssh-command)
3a. [Zip Byte](#zip-command)
4. [SCP Byte](#scp-command)
5. [Sed Byte](#sed-command)
6. [Grep Byte](#grep-command)
Expand Down
27 changes: 27 additions & 0 deletions zip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## ZIP Command
> To make .zip from folders we use this utility. It does not preserve ownership information. To preserve it, we should use `tar` utility.
```shell
## SYNTAX
## zip OPTIONS ARCHIVE_NAME FILES
zip files.zip file1 file2

# suppress the output
zip -q files.zip file1 file2 file3

# archive a directory
zip -r files.zip filesDir/

# add other files to the zip as well
zip -r files.zip filesDir/ file1.txt ../shoaib/files.txt

## By default compression method used is : deflate
## SUPPORTED METHODS:
## 1. deflate
## 2. bzip2
# if a file cannot be compress,it stored as is
zip -r -Z bzip2 filesDir/

# specify compression level from 0-9
# default is 6 and 0 is no compression
zip -9 -r hello.zip filesDir/
```

0 comments on commit 395ac3a

Please sign in to comment.