Linux Nine Yin Canon Heart Palm Fragment 9 (file compression and archiving)

Source: Internet
Author: User
Tags file copy unpack

One: compression, decompression1, Compress/uncompress/zcat
    • -D: Unzip
    • -C: Output to the terminal, do not delete the original file
    • -V: Show more information
2, Gzip/ungzip/zcat
    • -D: Unzip
    • -C: Output The result of compression or decompression to standard output
    • -#: Specify compression ratio (1-9)
3, Bzip2/bunzip2/bzcat
    • -D: Unzip
    • -K: Keep the original file
    • -#: Specify compression ratio (1-9)
4, Xz/unxz/xzcat
    • -D: Unzip
    • -K: Keep the original file
    • -#: Specify compression ratio (1-9), default is 6
5, Zip/unzip
    • -R: Recursive packaging, can be packaged directory
    • Unzip-p: Output extracted files to standard output
II: Archive (TAR)

tar:

    • -C: Create
    • -F: Specify file after archive
    • -V: More information
    • -P: Preserve original properties
    • -T: Preview
    • X: Unpacking
    • -C DIR: Unpacking to the specified folder
    • -z:.gz calling Gzip
    • -J:.BZ2 Call bzip2
    • -J:.XZ Call XZ
    • -T filelist: Specifies a list of packaged file directories
    • -X filelist: Specifies a list of files that are not packaged
TAR-JCF log. tar.xz/var/tar jxf log.  Tar.xz  

Split -b 10m-d lod.tar.gz new.tar.gz cutting Large compressed files

Cat new.tar* >filename.tar.gz Merging files

Cpio: A command is a redirected way to package a file for backup, restore a recovery tool that can decompress files ending with ". Cpio" or ". Tar"

    • -o Package a file copy into a file or export the file to the device
    • -I unpack, unzip the package file or restore the backup on the device to the system
    • -T Preview, view the contents of the file or output to the file on the device
    • -V Displays the file name during the packaging process
    • -D Unpack the directory, and automatically build the directory when Cpio restore
    • -C A newer storage method
Gzip-9 >/mnt/boot/initrd.gz # zcat/boot/initramfs-2.6.32-431.el6.x86_64.img | Cpio-id

Linux Nine Yin Canon Heart Palm Fragment 9 (file compression and archiving)

Related Article

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.