Skip to content

Commit e8fe6e8

Browse files
committed
Merge markdown files
1 parent 395ac3a commit e8fe6e8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
1. [Linux Navigation Byte](#linux-navigation-commands)
77
2. [Files & Directories Byte](#files-and-directories)
88
3. [SSH Byte](#ssh-command)
9+
3a. [Zip Byte](#zip-command)
910
4. [SCP Byte](#scp-command)
1011
5. [Sed Byte](#sed-command)
1112
6. [Grep Byte](#grep-command)
@@ -235,6 +236,33 @@ Host webserver
235236
Hostname server2
236237
LocalForward 8080:localhost:80 # Expose local port 8080 to remote port 80
237238
```
239+
## ZIP Command
240+
> To make .zip from folders we use this utility. It does not preserve ownership information. To preserve it, we should use `tar` utility.
241+
```shell
242+
## SYNTAX
243+
## zip OPTIONS ARCHIVE_NAME FILES
244+
zip files.zip file1 file2
245+
246+
# suppress the output
247+
zip -q files.zip file1 file2 file3
248+
249+
# archive a directory
250+
zip -r files.zip filesDir/
251+
252+
# add other files to the zip as well
253+
zip -r files.zip filesDir/ file1.txt ../shoaib/files.txt
254+
255+
## By default compression method used is : deflate
256+
## SUPPORTED METHODS:
257+
## 1. deflate
258+
## 2. bzip2
259+
# if a file cannot be compress,it stored as is
260+
zip -r -Z bzip2 filesDir/
261+
262+
# specify compression level from 0-9
263+
# default is 6 and 0 is no compression
264+
zip -9 -r hello.zip filesDir/
265+
```
238266
## SCP Command
239267
> SCP or Secure Copy is used to copy files to and from a machine over an ssh connection. Files are encrypted while transfer so, its safe. SCP uses ':' to differentiate between
240268
>

0 commit comments

Comments
 (0)