Marco 9-4

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.