Compress, unzip the command:
Compression format: gz,bz2,xz,zip,z
Compression algorithm: The algorithm is different, the compression ratio will be different;
Compress:filename.z
Gzip:.gz Gzip/path/to/somefile: The original file is deleted when the compression is complete
, d[
-#:1-9, specifying the compression ratio, which defaults to 6
Gunzip:gunzip/path/to/some_compress_file.gz: The original file will be deleted when the decompression is complete
Zcat/path/to/somefile.gz: To view the contents of a text file without being pressed
bzip2:bz2
A tool that has a greater compression ratio than gzip, using a format approximation
Bzip2/path/to/somefile
-D:
-#:1-9, default is 6
Bunzip2/path/to/somefile
Bzcat No pressure direct view
Xz:.xz
Xz/path/to/somefile
-D
-#:1-9, default is 6
-K: Keep the original file when compressing
Unxz
Xzdec
Xzcat
Archive: Archiving, archiving by itself does not imply compression
Zip: A tool that archives and compresses
Zip Filename.zip FILE1 FILE2 ...; Do not delete source files after compression
Unzip Filename.zip
Tar: Archive tool
-C: Create an archive file
-F File.tar: Archived files for operations
-X: Expand Archive
--xattrs: Preserves extended attribute information for files when archiving
-T: Do not expand the archive, view directly, what files are archived
-ZCF: Archive and invoke gzip compression
-ZXF: Call gzip to unzip and expand archive
-jcf:bzip2
-JXF:
-JCF:
-JXF:
Cpio: Archive Tool
Script Programming:
While loop: for scenes with unknown cycle times
Grammar:
While Condition;do
Statement
...
Done
Calculates the sum of all positive numbers within 100
#! /bin/bash
Declare-i I=1
Declare-i sum=0
While [$I-le]:d o
Let sum+= $I
Let i++
Done
#! /bin/bash
#
Read-p "inputsomething": String=hello World
while [$STRING! = ' Quit '];do
echo $STRING |tv ' A-Z ' A-Z
Read-p "Input so
Marco 9-4