L-1-17 commands for compressing and archiving Linux commands

Source: Internet
Author: User
Tags bz2 gz file uncompress

[BZIP2]

Bzip2 <file>

Compress the file into bz2 format and delete the original file.

Suitable for large file compression

-D <*.bz2>

Extract

-<num>

Specifies the compression ratio. <NUM>∈[1,9]

-K

Keep the original file

Related Commands bunzip2


[BUNZIP2]

BUNZIP2 <*.bz2>

Decompression *.bz2

Related Commands bzip2


[Bzcat]

Bzcat <*.bz2>

View bz2 's File contents

Related Commands bzip2


[Cdrecord]

Cdrecord-scanbus Dev=ata Find the recorder in the system, it should be a location in X, Y, Z

Cdrecord-v dev=ata:x,y,z Blank={fast|all} erase Content

CDRECORD-V dev=ata:x,y,z-format format RW disc

Cdrecord-v dev=ata:x,y,z <*.iso> Burning

-V Textual Representation process

-data written in digital form

-eject Finish burning the auto-pinball disc


Parameters for the DVD

-sao Support for DVD-RW formats

Example of a CD burning

Cdrecord-v dev=ata:1,1,0 Blank=fast

Cdrecord-v dev=ata:1,1,0 fs=8m-dummy-data \ >/tmp/system.img


[Compress]

Compress <file>

Compress a file into Z format and delete the original file.

Any compression can use redirection to prevent the deletion of the original file

Related Commands uncompress


[Cpio]

Cpio <file> make or release files.

Cpio-id < <path>//read a CPIO archive from the specified path and extract it to the current folder

or with the pipe command {<command>|<path>}|cpio-id

Related Commands Tar


[Gunzip]

Gunzip <*.gz>

Unzip the *.gz and delete the original file

Related Commands gzip


[Gzip]

Gzip <file>

Compress a file into GZ format and delete the original file.

Related Commands Gunzip

-D <*.gz> Unzip

-[1,9] > <path>//Specify the compression ratio, the higher the number, the higher the compression rate.


[Mkisofs]

MKISOFS CD ISO image generation

-O <*.iso>//Specify ISO file, or IMG, will generate this file

-R supports file data with Rock Ridge to record more information

-V Textual Representation process

-M <filename> exclude these files, they will not appear in the ISO

-V New Volume

<dir2> directories in the-graft-point <dir1>=<dir2> real directory will be burned to <dir1>

Use the Cdrecord command for the engraved disc

[Tar]

Tar <file|dir>

Files or directories are archived and not compressed.


-C

Create an archive file


-F <*.tar>

Specify an archive for the operation

If you want to use F need to put in the last.


-X

Expand Archive


--xattrs

Preserve extended attribute information for files when archiving

-T

View archived files directly without expanding the archive


-zcf

Archive to tar and compress with gzip

-[z]x[v]f <*.tar.gz>

Unzip first and release the archive.


-jcf

Archive into tar and use bzip2 compression

-[j]x[v]f <*.tar.bz2>

Unzip first and release the archive.


-jcf

Archive into tar and use XZ compression.

Not supported before Red Hat 5.

-[J]XF <*.tar.xz>

Unzip and unpack the file.

Related Commands Cpio


-C <path>

Expand to a specific directory


[Uncompress]

Uncompress <*. Z>

Unzip *. Z, and delete the original file

Related Commands Compress


[UNXZ]

Unxz <*.xz>

Extract

Related commands xz Xzcat Xzdec


[Unzip]

Unzip <*.zip>

Unzip the file.

-X <filename>

Exclude this file when compressing

-Z

View the contents of this compressed package-l,-v have the same effect


[XZ]

XZ <file>

Compress the file into XZ format and delete the original file.

May need to be installed

-D <*.xz> Unzip

-<num> specifies the compression ratio. <NUM>∈[1,9]

-K Keep the original file

Related Commands Unxz Xzcat


[Xzcat]

Xzcat <*.xz> View XZ file contents

Related commands xz Xzdec unxz


[Xzdec]

Xzdec <*.xz>

Unzip XZ file

[-d]

Unzip, can be ignored

-K

Keep the original file

-C

Screen display

Related commands xz Unxz xzcat


[Zcat]

Zcat <*.gz>

View the contents of the GZ file.

[Zip]

Zip <name.zip> <file|dir> [<file2|dir2>]

Compressed into a zip format, you can compress folders. The generated zip needs to be named. The original file will not be deleted

-M

Delete the original file after compression is complete

-R <dir>

Directory compression for current directory

-j

Ignore contents of subdirectories when compressing

-N <.exe> | [<.jpg>]

Files that are not pressed to list format when compressing

-T Mmddyy

Compress files after a specified date

-Y

Do not compress the original file of the linked file

-<1-9>

Compression ratio, the higher the number, the higher the compression rate

-X <filename>

Exclude this file when compressing

Associated Command Unzip

L-1-17 commands for compressing and archiving Linux commands

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.